From 85241817f86aa6a0043685f4e7e31ba7be95ebe0 Mon Sep 17 00:00:00 2001 From: axel Date: Sat, 27 Jan 2007 12:07:52 +1000 Subject: [PATCH] Drop unneeded generic descriptions for completion of functions and builtins. Add description for count. darcs-hash:20070127020752-ac50b-62dba47967cac04cd242894bfaa03116461883f3.gz --- builtin.c | 2 +- complete.c | 16 ++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/builtin.c b/builtin.c index 4fd0aa1fc..caf9e3a64 100644 --- a/builtin.c +++ b/builtin.c @@ -3127,7 +3127,7 @@ const static builtin_data_t builtin_data[]= displays the help for count, but 'count (echo -h)' does not. */ { - L"count", &builtin_generic, 0 + L"count", &builtin_generic, N_( L"Count the number of arguments" ) } , { diff --git a/complete.c b/complete.c index f649d65f1..74557b183 100644 --- a/complete.c +++ b/complete.c @@ -115,15 +115,6 @@ These functions are used for storing and retrieving tab-completion data, as well */ #define COMPLETE_DIRECTORY_DESC _( L"Directory" ) -/** - Generic description for functions -*/ -#define COMPLETE_FUNCTION_DESC _( L"Function" ) -/** - Generic description for builtin commands -*/ -#define COMPLETE_BUILTIN_DESC _( L"Builtin" ) - /** The command to run to get a description from a file suffix */ @@ -1408,19 +1399,16 @@ static void complete_cmd( const wchar_t *cmd, if( use_function ) { - function_get_names( &possible_comp, cmd[0] == L'_' ); - copy_strings_with_prefix( comp, cmd, COMPLETE_FUNCTION_DESC, &complete_function_desc, &possible_comp ); + copy_strings_with_prefix( comp, cmd, 0, &complete_function_desc, &possible_comp ); } al_truncate( &possible_comp, 0 ); if( use_builtin ) { - builtin_get_names( &possible_comp ); - copy_strings_with_prefix( comp, cmd, COMPLETE_BUILTIN_DESC, &builtin_get_desc, &possible_comp ); - + copy_strings_with_prefix( comp, cmd, 0, &builtin_get_desc, &possible_comp ); } al_destroy( &possible_comp );