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-02-08 13:30:48 +01:00
2021-02-16 16:45:59 +01:00
2021-07-17 19:03:15 +02:00
2019-06-26 21:19:40 +02:00
2020-01-19 15:07:06 +01:00
2021-02-15 17:08:26 +01:00
2021-06-23 21:30:10 +02:00
2020-12-29 12:48:11 +01:00
2020-02-07 20:53:20 +01:00
2021-06-24 18:19:28 +02:00
2020-04-26 08:49:01 +02:00
2021-06-24 20:46:03 +02:00
2020-02-17 11:39:53 +01:00
2021-06-24 18:17:10 +02:00
2021-07-21 22:33:39 +02:00
2021-07-03 08:45:47 +02:00
2019-07-09 10:02:50 -07:00
2021-06-24 20:46:03 +02:00
2021-06-24 18:17:10 +02:00
2021-06-24 20:46:03 +02:00
2021-03-02 14:53:02 +01:00
2020-03-16 21:21:10 +01:00
2021-06-24 18:17:10 +02:00
2020-09-26 14:56:03 +02:00