Make sure that command specific completions can handle input strings with wildcards reasonably well

darcs-hash:20060219011432-ac50b-89a73a3d414f2dbd8a213b851fcb1c494e022eae.gz
This commit is contained in:
axel
2006-02-19 11:14:32 +10:00
parent 0840c9248f
commit 43ab84397b
7 changed files with 56 additions and 10 deletions

View File

@@ -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<al_get_count( possible_comp ); i++ )