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-05-29 20:53:44 +02:00
2020-10-04 12:39:32 +02:00
2021-05-08 12:12:56 +02:00
2020-02-23 23:41:16 -08:00
2021-03-26 19:32:14 +01:00
2021-02-28 20:56:23 +08:00
2021-06-23 20:51:20 +02:00
2020-03-09 19:24:38 +01:00
2020-04-04 10:44:53 +02:00
2020-04-18 10:40:48 +02:00
2020-04-18 10:40:48 +02:00
2020-09-04 16:55:09 +02:00
2021-06-23 20:51:20 +02:00
2021-05-16 20:48:53 +02:00
2020-03-09 19:24:38 +01:00
2021-02-02 08:35:38 +01:00
2020-04-18 10:40:48 +02:00
2020-04-18 10:40:48 +02:00
2020-03-21 15:31:25 +01:00
2020-08-26 18:29:03 +02:00
2020-04-04 10:44:53 +02:00
2020-04-04 10:44:53 +02:00
2020-03-21 13:21:38 +01:00
2020-02-23 23:41:16 -08:00
2021-02-28 20:56:23 +08:00
2020-10-10 21:49:33 +02:00
2020-09-18 16:53:59 +02:00
2020-09-06 11:15:54 +02:00
2021-07-14 18:56:19 +02:00
2020-10-26 19:25:41 +01:00
2020-10-28 17:44:45 +01:00
2020-12-28 19:39:27 +01:00
2020-12-14 19:36:18 +01:00
2020-06-30 23:45:41 +02:00
2020-04-19 07:06:31 +02:00
2020-06-06 22:52:13 +08:00
2020-10-02 19:02:10 +02:00
2021-01-03 15:15:57 +01:00
2020-10-02 23:45:38 +02:00
2020-10-28 17:44:45 +01:00
2020-04-04 10:44:53 +02:00
2020-10-02 23:45:38 +02:00
2021-01-29 20:46:34 +01:00
2020-04-04 10:44:53 +02:00
2020-03-21 13:20:34 +01:00
2021-05-28 20:49:57 +02:00
2021-07-11 23:03:39 +08:00
2021-05-19 19:09:46 +02:00
2020-03-21 15:31:25 +01:00
2020-08-04 21:44:26 +02:00
2020-09-05 15:54:48 +02:00
2021-02-28 20:56:23 +08:00
2021-03-30 17:21:28 +02:00
2020-04-18 10:40:48 +02:00
2020-02-23 23:41:16 -08:00
2020-04-18 10:40:48 +02:00
2020-04-18 10:40:48 +02:00
2021-07-16 18:21:41 +02:00
2021-04-30 17:07:54 +02:00
2020-04-04 10:44:53 +02:00
2021-05-04 13:21:46 -07:00
2021-07-16 18:21:41 +02:00
2020-09-10 20:48:13 +02:00
2021-02-02 09:42:57 +01:00
2021-07-16 18:21:41 +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-07-13 21:33:42 +02:00
2020-08-26 18:29:03 +02:00
2021-05-04 13:50:09 -07:00
2020-09-27 21:59:15 +02:00
2021-07-16 20:27:54 +02:00
2020-09-28 18:42:02 +02:00
2020-08-26 18:29:03 +02:00
2020-08-26 18:29:03 +02:00
2020-03-22 15:53:09 +01:00
2020-12-01 18:55:01 +01:00
2021-07-16 18:21:41 +02:00
2021-07-16 18:21:41 +02:00
2020-02-23 23:41:16 -08:00
2020-09-04 16:55:09 +02:00
2020-03-21 15:31:25 +01:00
2021-02-02 08:35:38 +01:00