mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-17 19:21:15 -03:00
This is a weird confusion between the "end" and "terminate" token types. "end" is the end of the "line" - a newline or ";". "terminate" is the end of the "file" - like pressing newline interactively or having the file end. So this would count things like `if` and `switch` as a "help" invocation even if followed by a newline, e.g. ```fish if; echo foo ``` and ```fish switch case foo ``` The result of that was that a naked "if" in a script file isn't an error, but doesn't start a block either, so if you complete the block it would count the "end" as superfluous, which sends you on a bit of a hunt to figure out where the block start is missing.