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
..
2020-04-04 10:44:53 +02:00
2021-02-02 08:35:38 +01:00
2020-03-21 15:31:25 +01:00
2020-04-04 10:44:53 +02:00
2020-04-04 10:44:53 +02:00
2020-04-04 10:44:53 +02:00
2020-03-21 15:31:25 +01:00
2020-04-04 10:44:53 +02:00
2021-05-04 13:21:46 -07:00
2020-09-10 20:48:13 +02:00
2021-07-21 22:33:39 +02:00
2021-05-12 18:52:24 +02:00
2020-04-13 22:56:22 +02:00
2021-04-14 21:46:51 +02:00
2021-05-04 13:50:09 -07:00
2020-03-22 15:53:09 +01:00
2020-03-21 15:31:25 +01:00
2021-02-02 08:35:38 +01:00