-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Strict mode options #805
Copy link
Copy link
Closed
Labels
Description
When writing scripts in bash, I always use some combination of:
set -e(fail if any command fails)set -u(fail if any undefined variable is referenced)set -x(print each command before it's executed)set -o pipefail(a failed command in a pipeline will cause the parent command to fail)
Additionally, it would be nice to have an option like pipefail that applies to subshells (i.e causes echo (false) to return nonzero status).
It doesn't seem like any of these are available in fish, which doesn't usually matter for interactive use but kills it as a scripting language for me (which is a shame, because fish's sensible variable-expansion would make it much harder to accidentally get quoting wrong).
Any chance of adding similar features?
Reactions are currently unavailable