diff --git a/builtin.cpp b/builtin.cpp index 1d570ae92..3204a6055 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -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" ); } diff --git a/parse_util.cpp b/parse_util.cpp index eed4b2605..c9c7f548c 100644 --- a/parse_util.cpp +++ b/parse_util.cpp @@ -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; } diff --git a/share/functions/funced.fish b/share/functions/funced.fish index cc9db224a..075b03019 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -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