mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
parent
ce2f53237e
commit
0f8b9699a1
2 changed files with 16 additions and 0 deletions
|
@ -866,6 +866,12 @@ static const wchar_t *error_format_for_character(wchar_t wc) {
|
||||||
case VARIABLE_EXPAND_EMPTY: {
|
case VARIABLE_EXPAND_EMPTY: {
|
||||||
return ERROR_NOT_PID;
|
return ERROR_NOT_PID;
|
||||||
}
|
}
|
||||||
|
case BRACE_END:
|
||||||
|
case L'}':
|
||||||
|
case L',':
|
||||||
|
case BRACE_SEP: {
|
||||||
|
return ERROR_NO_VAR_NAME;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
return ERROR_BAD_VAR_CHAR1;
|
return ERROR_BAD_VAR_CHAR1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,3 +55,13 @@ $fish -c "set -g fish_function_path $(string escape $TMPDIR); this_should_be_an_
|
||||||
# CHECKERR: fish:
|
# CHECKERR: fish:
|
||||||
# CHECKERR: set -g fish_function_path {{.*}}; this_should_be_an_error
|
# CHECKERR: set -g fish_function_path {{.*}}; this_should_be_an_error
|
||||||
# CHECKERR: ^~~~~~~~~~~~~~~~~~~~~~^
|
# CHECKERR: ^~~~~~~~~~~~~~~~~~~~~~^
|
||||||
|
|
||||||
|
$fish -c 'echo {$}'
|
||||||
|
# CHECKERR: fish: Expected a variable name after this $. <= no more checks
|
||||||
|
# CHECKERR: echo {$}
|
||||||
|
# CHECKERR: ^
|
||||||
|
|
||||||
|
$fish -c 'echo {$,}'
|
||||||
|
# CHECKERR: fish: Expected a variable name after this $.
|
||||||
|
# CHECKERR: echo {$,}
|
||||||
|
# CHECKERR: ^
|
||||||
|
|
Loading…
Reference in a new issue