Hacker News new | ask | show | jobs
by coldtea 3374 days ago
Well, Rust and Haskell might not be for the job, but sh and bash are clearly broken and in many ways.

-eu should have been the default from the start, for one.

1 comments

Well, for scripts. set -e on an interactive shell is a bit of a challenge.
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...
interactive commands should abort the command on unset variable
"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!
> Imagine an interactive shell exiting as soon as a user's command failed!

Hardcore mode.