[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: command substitution is stripping set -e from options
From: |
Christoph Gysin |
Subject: |
Re: command substitution is stripping set -e from options |
Date: |
Fri, 2 Oct 2015 14:25:00 +0300 |
> Yes, it's how bash has always behaved, at least back to bash-1.14 when
> I stopped looking. Around bash-2.05, it changed to preserve the -e
> option when in Posix mode.
Is there any reason not to preserve it?
> That exception from default bash behavior is documented in the Posix
> Mode section of the texinfo manual.
Thanks, the bash manpage indeed references:
http://tiswww.case.edu/php/chet/bash/POSIX
(btw: would it make sense to add this as a manpage, e.g. as bash-posix?)
The relevant point seems to be:
36. Subshells spawned to execute command substitutions inherit the
value of the `-e' option from the parent shell. When not in POSIX
mode, Bash clears the `-e' option in such subshells.
Now I'm still curious why this isn't the default behaviour in bash?
Thanks,
Chris
--
echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3
- command substitution is stripping set -e from options, Christoph Gysin, 2015/10/08
- Re: command substitution is stripping set -e from options, Chet Ramey, 2015/10/08
- Re: command substitution is stripping set -e from options,
Christoph Gysin <=
- Re: command substitution is stripping set -e from options, Eric Blake, 2015/10/08
- Re: command substitution is stripping set -e from options, Christoph Gysin, 2015/10/08
- Re: command substitution is stripping set -e from options, Greg Wooledge, 2015/10/08
- Re: command substitution is stripping set -e from options, Christoph Gysin, 2015/10/08
- Re: command substitution is stripping set -e from options, Greg Wooledge, 2015/10/08
- Re: command substitution is stripping set -e from options, Christoph Gysin, 2015/10/08
- Re: command substitution is stripping set -e from options, Chet Ramey, 2015/10/08
- Re: command substitution is stripping set -e from options, Christoph Gysin, 2015/10/08
- Re: command substitution is stripping set -e from options, Chet Ramey, 2015/10/09
- Re: command substitution is stripping set -e from options, Christoph Gysin, 2015/10/08