mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fixed case behaviour
* case no properly handles -h and --help flags, i.e. treats it as pattern * fixed case escaping: The following expressions now work correctly: switch '*' echo '*' echo Match any string end switch '*' echo '\*' echo Match asterix end switch '\\' echo '\\\\' echo Match slash end The same for '?' sign
This commit is contained in:
parent
a1319cb8aa
commit
ea4b37d5c5
3 changed files with 3 additions and 3 deletions
|
@ -3838,7 +3838,7 @@ static int internal_help( const wchar_t *cmd )
|
|||
{
|
||||
CHECK( cmd, 0 );
|
||||
return contains( cmd, L"for", L"while", L"function",
|
||||
L"if", L"end", L"switch", L"count" );
|
||||
L"if", L"end", L"switch", L"case", L"count" );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -665,7 +665,6 @@ wchar_t *parse_util_unescape_wildcards( const wchar_t *str )
|
|||
in++;
|
||||
*(out++)=*in;
|
||||
}
|
||||
*(out++)=*in;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -688,6 +687,7 @@ wchar_t *parse_util_unescape_wildcards( const wchar_t *str )
|
|||
}
|
||||
}
|
||||
}
|
||||
*out = *in;
|
||||
return unescaped;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ function funced --description 'Edit function definition'
|
|||
set -l funcname
|
||||
while set -q argv[1]
|
||||
switch $argv[1]
|
||||
case '---long impossible to match line, because case respects -h option' -h --help
|
||||
case -h --help
|
||||
__fish_print_help funced
|
||||
return 0
|
||||
|
||||
|
|
Loading…
Reference in a new issue