diff --git a/complete.c b/complete.c index 028cf86da..caaabf3bd 100644 --- a/complete.c +++ b/complete.c @@ -1389,8 +1389,6 @@ static void complete_cmd( const wchar_t *cmd, nxt_path != 0; nxt_path = wcstok( 0, ARRAY_SEP_STR, &state) ) { - int i; - array_list_t tmp; wchar_t *nxt_completion= wcsdupcat2( nxt_path, (nxt_path[wcslen(nxt_path)-1]==L'/'?L"":L"/"), @@ -1401,36 +1399,15 @@ static void complete_cmd( const wchar_t *cmd, continue; } - al_init( &tmp ); - if( expand_string( 0, - nxt_completion, - &tmp, + nxt_completion, + comp, ACCEPT_INCOMPLETE | DIRECTORIES_ONLY ) != EXPAND_ERROR ) { - - for( i=0; i