fish-shell/doc_src
Fabian Homborg 3359e5d2e9
Let "return" exit a script (#8148)
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.
2021-07-21 22:33:39 +02:00
..
cmds Let "return" exit a script (#8148) 2021-07-21 22:33:39 +02:00
python_docs_theme docs: Stop making code *smaller* 2021-07-01 17:50:25 +02:00
commands.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
completions.rst docs: Replace all internal links with :ref:s 2021-03-26 19:32:14 +01:00
conf.py docs: Remove lAtEx thing again 2021-07-14 17:03:41 +02:00
design.rst Make rationale spacing consistent 2020-10-12 20:25:35 +02:00
faq.rst docs: Made the abort/edit history feature more discoverable. 2021-07-03 16:39:32 +02:00
fish_for_bash_users.rst docs: Some more $() changes 2021-07-16 18:08:36 +02:00
fish_indent_lexer.py Highlight keywords differently 2021-02-07 21:18:51 +01:00
index.rst docs: Some de-alienizing of the configuration section 2021-07-20 21:03:55 +02:00
interactive.rst docs: Put a note on which binding function to call in each section 2021-07-14 16:49:22 +02:00
language.rst docs: Reword bit about aliases and autoloading 2021-07-14 16:46:26 +02:00
license.rst Update copyright years 2021-05-03 13:12:11 +02:00
relnotes.rst docs: call the CHANGELOG "release notes" 2021-02-25 22:46:24 +08:00
tutorial.rst docs: Add some links 2021-07-16 18:08:55 +02:00