mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +00:00
Make sure case sensitive completions are ignored by the pager if case sensitive completions exist
darcs-hash:20080109000928-75c98-fc6dc6fcebca99f33a1ed484444efee87f5caa94.gz
This commit is contained in:
parent
5379200b9e
commit
b4042b18c6
1 changed files with 13 additions and 1 deletions
14
reader.c
14
reader.c
|
@ -1091,7 +1091,8 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp )
|
|||
char *foo;
|
||||
io_data_t *in;
|
||||
wchar_t *escaped_separator;
|
||||
|
||||
int has_case_sensitive=0;
|
||||
|
||||
if( !prefix || (wcslen(prefix)==0))
|
||||
{
|
||||
prefix_esc = wcsdup(L"\"\"");
|
||||
|
@ -1116,6 +1117,12 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp )
|
|||
|
||||
escaped_separator = escape( COMPLETE_SEP_STR, 1);
|
||||
|
||||
for( i=0; i<al_get_count( comp ); i++ )
|
||||
{
|
||||
completion_t *el = (completion_t *)al_get( comp, i );
|
||||
has_case_sensitive |= !(el->flags & COMPLETE_NO_CASE );
|
||||
}
|
||||
|
||||
for( i=0; i<al_get_count( comp ); i++ )
|
||||
{
|
||||
|
||||
|
@ -1125,6 +1132,11 @@ static void run_pager( wchar_t *prefix, int is_quoted, array_list_t *comp )
|
|||
wchar_t *foo=0;
|
||||
wchar_t *baz=0;
|
||||
|
||||
if( has_case_sensitive && (el->flags & COMPLETE_NO_CASE ))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( el && el->completion )
|
||||
{
|
||||
if( el->flags & COMPLETE_NO_CASE )
|
||||
|
|
Loading…
Reference in a new issue