mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
4d2f7b0c0d
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). |
||
---|---|---|
.. | ||
checks | ||
pexpects | ||
test_functions | ||
.gitignore | ||
history_sample_bash | ||
history_sample_corrupt1 | ||
history_sample_fish_1_x | ||
history_sample_fish_2_0 | ||
interactive.config | ||
interactive.fish | ||
test.fish | ||
test_driver.sh | ||
test_env.sh | ||
test_util.fish |