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
..
2021-05-03 12:01:21 +02:00
2020-11-22 14:39:48 +01:00
2021-03-28 15:31:25 -07:00
2021-07-17 19:03:15 +02:00
2021-03-28 15:31:25 -07:00
2021-03-28 15:31:25 -07:00
2020-11-22 14:39:48 +01:00
2021-03-28 15:31:25 -07:00
2021-05-25 17:39:55 -07:00
2021-05-17 15:25:21 -07:00
2021-07-15 13:15:24 -07:00
2021-02-08 15:16:21 -06:00
2021-07-15 13:15:24 -07:00
2021-07-21 11:51:46 -07:00
2021-05-31 13:38:56 -07:00
2021-04-17 16:43:27 -07:00
2021-05-22 18:09:15 +02:00
2021-05-10 14:23:07 -07:00
2021-07-15 13:15:24 -07:00
2020-11-22 14:39:48 +01:00
2021-07-15 13:15:24 -07:00
2021-07-17 12:20:54 -07:00
2021-05-10 16:49:01 -07:00
2021-04-17 16:43:27 -07:00
2021-04-21 17:37:44 -07:00
2021-05-10 16:49:01 -07:00
2021-07-15 11:36:43 -07:00
2021-07-15 11:36:43 -07:00
2021-07-21 11:51:46 -07:00
2021-07-21 11:51:46 -07:00
2021-05-18 11:27:30 +02:00
2021-03-21 19:41:36 +01:00
2020-12-14 22:54:53 +01:00
2021-04-17 16:43:27 -07:00
2021-05-17 15:25:21 -07:00
2021-04-18 14:46:05 -07:00
2021-04-18 14:46:05 -07:00
2021-03-28 15:31:25 -07:00
2021-03-28 15:31:25 -07:00
2021-06-13 17:20:04 -07:00
2021-06-13 17:20:04 -07:00