From 55b253152cfbaa1a330a31a3c257424e6a33eb15 Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 16 Nov 2006 23:04:00 +1000 Subject: [PATCH] Only do command description lookup if we have non-directory commands darcs-hash:20061116130400-ac50b-47b7159276d607aab8c4a8d52a9c8a60a3f77819.gz --- complete.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/complete.c b/complete.c index fa464dc5e..ba7de179a 100644 --- a/complete.c +++ b/complete.c @@ -1115,7 +1115,8 @@ static void complete_cmd_desc( const wchar_t *cmd, array_list_t *comp ) array_list_t list; hash_table_t lookup; wchar_t *esc; - + int skip; + if( !cmd ) return; @@ -1141,6 +1142,35 @@ static void complete_cmd_desc( const wchar_t *cmd, array_list_t *comp ) return; } + skip = 1; + + for( i=0; i prev_count ) - { - complete_cmd_desc( cmd, comp ); - } + complete_cmd_desc( cmd, comp ); } al_destroy( &tmp ); }