diff --git a/builtin.c b/builtin.c index 7cfc6559f..dee20bff6 100644 --- a/builtin.c +++ b/builtin.c @@ -2968,8 +2968,10 @@ static int builtin_case( wchar_t **argv ) for( i=1; iparam1.switch_value, unescaped ) ) { current_block->skip = 0; diff --git a/common.c b/common.c index 228e061f7..32f853c2f 100644 --- a/common.c +++ b/common.c @@ -527,8 +527,6 @@ int wcsvarname( wchar_t *str ) str++; } return 1; - - } diff --git a/complete.c b/complete.c index f5e3fe333..90e4173e7 100644 --- a/complete.c +++ b/complete.c @@ -1001,17 +1001,21 @@ static void copy_strings_with_prefix( array_list_t *comp_out, array_list_t *possible_comp ) { int i; - wchar_t *wc; + wchar_t *wc, *tmp; - wc = expand_one( 0, + tmp = expand_one( 0, wcsdup(wc_escaped), EXPAND_SKIP_SUBSHELL | EXPAND_SKIP_WILDCARDS); - if(!wc) + if(!tmp) return; - if( wc[0] == L'~' ) + if( tmp[0] == L'~' ) { - wc=expand_tilde(wc); + tmp=expand_tilde(wc); } + + wc = parse_util_unescape_wildcards( tmp ); + free(tmp); + // int str_len = wcslen( str ); for( i=0; i