mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +00:00
Fix for issue where 'while |' would be incorrectly interpreted as a
"naked statement" causing a wonky error message
This commit is contained in:
parent
4402f73bf7
commit
e2da73bf4f
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ RESOLVE(statement)
|
|||
|
||||
// Likewise if the next token doesn't look like an argument at all. This corresponds to e.g. a "naked if".
|
||||
bool naked_invocation_invokes_help = (token1.keyword != parse_keyword_begin && token1.keyword != parse_keyword_end);
|
||||
if (naked_invocation_invokes_help && token2.type != parse_token_type_string)
|
||||
if (naked_invocation_invokes_help && (token2.type == parse_token_type_end || token2.type == parse_token_type_terminate))
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue