mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-30 06:03:49 +08:00
3359e5d2e9
Currently, if a "return" is given outside of a function, we'd just throw an error. That always struck me as a bit weird, given that scripts can also return a value. So simply let "return" outside also exit the script, kinda like "exit" does. However, unlike "exit" it doesn't quit an interactive shell - it seems weird to have "return" do that as well. It sets $status, so it can be used to quickly set that, in case you want to test something. |
||
---|---|---|
.. | ||
cmds | ||
python_docs_theme | ||
commands.rst | ||
completions.rst | ||
conf.py | ||
design.rst | ||
faq.rst | ||
fish_for_bash_users.rst | ||
fish_indent_lexer.py | ||
index.rst | ||
interactive.rst | ||
language.rst | ||
license.rst | ||
relnotes.rst | ||
tutorial.rst |