mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 03:53:53 +08:00

This makes it so ```fish if -e foo # do something end ``` complains about `-e` not being a command instead of `end` being used outside of an if-block. That means both that `-e` could now be used as a command name (it already can outside of `if`!) *and* that we get a better error! The only way to get `if` to be a decorated statement now is to use `if -h` or `if --help` specifically (with a literal option). The same goes for switch, while and begin. It would be possible, alternatively, to disallow `if -e` and point towards using `test` instead, but the "unknown command" message should already point towards using `test` more than pointing at the "end" (that might be quite far away).