mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Makecompletion functions work with completion descriptions regardless of if they contain a separator character or not
darcs-hash:20060109171359-ac50b-d3fc75cb3263d1f20296e5e81a9f48caf345cd01.gz
This commit is contained in:
parent
fef1e1db32
commit
c45e457492
1 changed files with 9 additions and 1 deletions
10
wildcard.c
10
wildcard.c
|
@ -163,7 +163,15 @@ static int wildcard_complete_internal( const wchar_t *orig,
|
|||
Append generic description to item, if the description exists
|
||||
*/
|
||||
if( desc && wcslen(desc) )
|
||||
new = wcsdupcat2( str, desc, (void *)0 );
|
||||
{
|
||||
/*
|
||||
Check if the description already contains a separator character, if not, prepend it
|
||||
*/
|
||||
if( wcschr( desc, COMPLETE_SEP ) )
|
||||
new = wcsdupcat2( str, desc, (void *)0 );
|
||||
else
|
||||
new = wcsdupcat2( str, COMPLETE_SEP_STR, desc, (void *)0 );
|
||||
}
|
||||
else
|
||||
new = wcsdup( str );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue