diff options
author | 2006-10-26 06:28:36 +1000 | |
---|---|---|
committer | 2006-10-26 06:28:36 +1000 | |
commit | dfa73c7cc1f3b00592d81fff5274d8ee67bc41a8 (patch) | |
tree | 51c5b7cce2c8155602eed79514975cb9c0f79075 /builtin.c | |
parent | 12be24ef47a59110519ed7c2f4f81f61bdbc0459 (diff) |
Remove the --key-binding switch for fish
darcs-hash:20061025202836-ac50b-682015e2f5830a85ff520e89b0a951ca9d2913dc.gz
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 38 |
1 files changed, 5 insertions, 33 deletions
@@ -215,10 +215,11 @@ static void builtin_print_help( wchar_t *cmd, string_buffer_t *b ) if( is_interactive && !builtin_out_redirect && b==sb_err) { + /* Interactive mode help to screen - only print synopsis if the rest won't fit */ int screen_height, lines; - + screen_height = common_get_height(); lines = count_char( str, L'\n' ); if( lines > 2*screen_height/3 ) @@ -1005,27 +1006,10 @@ static int builtin_functions( wchar_t **argv ) } -/** - Test whether the specified string is a valid name for a keybinding -*/ -static int wcsbindingname( wchar_t *str ) -{ - while( *str ) - { - if( (!iswalnum(*str)) && (*str != L'-' ) ) - { - return 0; - } - str++; - } - return 1; -} - typedef struct function_data { wchar_t *name; wchar_t *description; - int is_binding; array_list_t *events; } function_data_t; @@ -1041,7 +1025,6 @@ static int builtin_function( wchar_t **argv ) int argc = builtin_count_args( argv ); int res=0; wchar_t *desc=0; - int is_binding=0; array_list_t *events; int i; @@ -1058,10 +1041,6 @@ static int builtin_function( wchar_t **argv ) } , { - L"key-binding", no_argument, 0, 'b' - } - , - { L"on-signal", required_argument, 0, 's' } , @@ -1093,7 +1072,7 @@ static int builtin_function( wchar_t **argv ) int opt = wgetopt_long( argc, argv, - L"bd:s:j:p:v:h", + L"d:s:j:p:v:h", long_options, &opt_index ); if( opt == -1 ) @@ -1108,7 +1087,6 @@ static int builtin_function( wchar_t **argv ) BUILTIN_ERR_UNKNOWN, argv[0], long_options[opt_index].name ); - builtin_print_help( argv[0], sb_err ); res = 1; break; @@ -1117,10 +1095,6 @@ static int builtin_function( wchar_t **argv ) desc=woptarg; break; - case 'b': - is_binding=1; - break; - case 's': { int sig = wcs2sig( woptarg ); @@ -1252,7 +1226,7 @@ static int builtin_function( wchar_t **argv ) return 0; case '?': - builtin_print_help( argv[0], sb_err ); + res = 1; break; @@ -1331,7 +1305,6 @@ static int builtin_function( wchar_t **argv ) d->name=halloc_wcsdup( current_block, argv[woptind]); d->description=desc?halloc_wcsdup( current_block, desc):0; - d->is_binding = is_binding; d->events = events; for( i=0; i<al_get_count( events ); i++ ) @@ -2542,8 +2515,7 @@ static void builtin_end_add_function_def( function_data_t *d ) function_add( d->name, def, d->description, - d->events, - d->is_binding ); + d->events ); free( def ); |