[execline] foreground/background suggestion

From: <invidio_at_disroot.org>
Date: Thu, 20 Oct 2022 09:05:17 +0000

Hi, I've been using execline to script a build system, it has been great as it's quite direct and does it job very well; and with its use I've come to believe that it could be a huge convience to add a flag, or an alternative binary, to foreground/background which would exit in case of "failure" (could be like forx -o/-x).

I usually do this:
foreground { command }
importas -iu status ?
ifelse -Xn { test  "${status}" -eq 0 } { exit $status }

I don't know if it's possible (I'm not too aware of the internals), but I believe that, being possible, it would be worth to add a flag or something, because it would be like its usual behaviour (as any command failing would break the chain) and would avoid the need to create many "statusX".

Unless I've been stupid and there's a better way to do this.
Received on Thu Oct 20 2022 - 11:05:17 CEST

This archive was generated by hypermail 2.4.0 : Thu Oct 20 2022 - 11:05:49 CEST