From dfa73c7cc1f3b00592d81fff5274d8ee67bc41a8 Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 26 Oct 2006 06:28:36 +1000 Subject: Remove the --key-binding switch for fish darcs-hash:20061025202836-ac50b-682015e2f5830a85ff520e89b0a951ca9d2913dc.gz --- builtin.c | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'builtin.c') diff --git a/builtin.c b/builtin.c index 2dc81d8f..ce216cdd 100644 --- a/builtin.c +++ b/builtin.c @@ -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; @@ -1057,10 +1040,6 @@ static int builtin_function( wchar_t **argv ) L"description", required_argument, 0, 'd' } , - { - 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; iname, def, d->description, - d->events, - d->is_binding ); + d->events ); free( def ); -- cgit v1.2.3