Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
TorKlingberg
· 9y ago · 0 comments
Well, for scripts. set -e on an interactive shell is a bit of a challenge.
Comments
[–]
coldtea
9y ago
A shell could, and I'm going out on a limb here, check whether it's interactive or not and just enforce the -e in the appropriate case...
[–]
harryjo
9y ago
interactive commands should abort
the command
on unset variable
[–]
tomjakubowski
9y ago
"Abort command if variables are unset" is the -u flag, not -e. Both were mentioned long ago in this thread, but GP was talking about -e being painful for interactive shells. Imagine an interactive shell exiting as soon as a user's command failed!
[–]
dllthomas
9y ago
> Imagine an interactive shell exiting as soon as a user's command failed!
Hardcore mode.