mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-27 20:25:12 +00:00
Do not unescape strings from completion callouts. Why was this done before?
darcs-hash:20060222174716-ac50b-218c6896918e5cf8047ea6291a8cde44061d0b57.gz
This commit is contained in:
parent
ca04fc745d
commit
68e0c94dbb
1 changed files with 15 additions and 3 deletions
16
complete.c
16
complete.c
|
@ -1365,7 +1365,7 @@ static void complete_from_args( const wchar_t *str,
|
||||||
{
|
{
|
||||||
|
|
||||||
array_list_t possible_comp;
|
array_list_t possible_comp;
|
||||||
int i;
|
/* int i; */
|
||||||
|
|
||||||
al_init( &possible_comp );
|
al_init( &possible_comp );
|
||||||
|
|
||||||
|
@ -1373,7 +1373,17 @@ static void complete_from_args( const wchar_t *str,
|
||||||
eval_args( args, &possible_comp );
|
eval_args( args, &possible_comp );
|
||||||
proc_pop_interactive();
|
proc_pop_interactive();
|
||||||
|
|
||||||
/* We need to unescape these strings before matching them */
|
/*
|
||||||
|
Completion results where previously unescaped by the
|
||||||
|
code below. I have no idea why that was done, but I have
|
||||||
|
not removed this since I'm not sure if this might be
|
||||||
|
correct, though I can't think of any reason why it
|
||||||
|
should be.
|
||||||
|
|
||||||
|
If this code is readded - add an explanation of _why_ completion
|
||||||
|
strings should be escaped!
|
||||||
|
*/
|
||||||
|
/*
|
||||||
for( i=0; i< al_get_count( &possible_comp ); i++ )
|
for( i=0; i< al_get_count( &possible_comp ); i++ )
|
||||||
{
|
{
|
||||||
wchar_t *next = (wchar_t *)al_get( &possible_comp, i );
|
wchar_t *next = (wchar_t *)al_get( &possible_comp, i );
|
||||||
|
@ -1387,6 +1397,7 @@ static void complete_from_args( const wchar_t *str,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
al_set( &possible_comp , i, 0 );
|
||||||
debug( 2, L"Could not expand string %ls on line %d of file %s", next, __LINE__, __FILE__ );
|
debug( 2, L"Could not expand string %ls on line %d of file %s", next, __LINE__, __FILE__ );
|
||||||
}
|
}
|
||||||
free( next );
|
free( next );
|
||||||
|
@ -1396,6 +1407,7 @@ static void complete_from_args( const wchar_t *str,
|
||||||
debug( 2, L"Got null string on line %d of file %s", __LINE__, __FILE__ );
|
debug( 2, L"Got null string on line %d of file %s", __LINE__, __FILE__ );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
copy_strings_with_prefix( comp_out, str, desc, 0, &possible_comp );
|
copy_strings_with_prefix( comp_out, str, desc, 0, &possible_comp );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue