From cab80b452bb3dbd65d5e8a1eeb869d84a7a94742 Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 23 Nov 2006 20:40:23 +1000 Subject: [PATCH] Fix bug where tab completions for implicit 'cd' would ignore symbolic links to directories darcs-hash:20061123104023-ac50b-7245f70e0f6fbbc97358e32c6dc7ca5258f24a53.gz --- complete.c | 33 +++++---------------------------- wildcard.c | 30 ++++++++++++++++++------------ 2 files changed, 23 insertions(+), 40 deletions(-) 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