From 754d8d37125609dc67c1f41d9b35f3bfa468317c Mon Sep 17 00:00:00 2001 From: axel Date: Sun, 4 Dec 2005 11:54:02 +1000 Subject: [PATCH] Fix bug breaking filename completions, introduced by csh wildcard syntax darcs-hash:20051204015402-ac50b-911c6188f6c8213a733f4e967fc903f5290f1772.gz --- complete.c | 5 ++++- expand.c | 7 +++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/complete.c b/complete.c index b6516b25d..a4aca179c 100644 --- a/complete.c +++ b/complete.c @@ -1771,7 +1771,10 @@ static void complete_param_expand( wchar_t *str, else comp_str = str; -// fwprintf( stderr, L"expand_string( \"%ls\", [list], EXPAND_SKIP_SUBSHELL | ACCEPT_INCOMPLETE | %ls )\n", comp_str, do_file?L"0":L"EXPAND_SKIP_WILDCARDS" ); + debug( 2, + L"expand_string( \"%ls\", comp_out, EXPAND_SKIP_SUBSHELL | ACCEPT_INCOMPLETE | %ls );", + comp_str, + do_file?L"0":L"EXPAND_SKIP_WILDCARDS" ); expand_string( wcsdup(comp_str), comp_out, EXPAND_SKIP_SUBSHELL | ACCEPT_INCOMPLETE | (do_file?0:EXPAND_SKIP_WILDCARDS) ); } diff --git a/expand.c b/expand.c index 120555e49..4b8e1e147 100644 --- a/expand.c +++ b/expand.c @@ -1392,7 +1392,8 @@ int expand_string( wchar_t *str, int subshell_ok = 1; int res = EXPAND_OK; - +// debug( 1, L"Expand %ls", str ); + if( (!(flags & ACCEPT_INCOMPLETE)) && is_clean( str ) ) { @@ -1560,11 +1561,9 @@ int expand_string( wchar_t *str, { if( res == EXPAND_OK ) res = EXPAND_WILDCARD_NO_MATCH; - + break; } - break; - case 1: res = EXPAND_WILDCARD_MATCH; sort_list( out );