Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • It does not look like the zsh solution has the behavior of set -o pipefail, just set -e. Any way to fix this? Commented Aug 1, 2017 at 16:09
  • Oh, silly me assuming the online docs would be up to date. Recent versions of zsh have a setopt pipe_fail which works just fine. Commented Aug 1, 2017 at 16:19
  • @RadonRosborough pipefail was outside the scope of the question. In bash, ksh and zsh you can do set -o pipefail (note that this isn't local to the function, except in zsh if you call setopt local_options in the function). This is not new and the online documentation is up-to-date, but not very easy to read. Commented Aug 1, 2017 at 16:37
  • You're right that the official manual at zsh.sourceforge.net/Doc/Release/Options.html is perfectly well up to date. I was looking at linux.die.net/man/1/zshoptions from Google, which I should have been more clear about. Commented Aug 1, 2017 at 17:51