Path: csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!usenet.stanford.edu!not-for-mail From: Christoph Gysin Newsgroups: gnu.bash.bug Subject: Re: command substitution is stripping set -e from options Date: Fri, 2 Oct 2015 14:25:00 +0300 Lines: 28 Approved: bug-bash@gnu.org Message-ID: References: <560D9539.2040009@case.edu> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: usenet.stanford.edu 1443788219 12141 208.118.235.17 (2 Oct 2015 12:16:59 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: chet.ramey@case.edu Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=nA75fIHO95mF3bCVNuRB3P3ABFB7R6+tmb6XLJ5in2k=; b=no37xujF5XjY0mUPtW2QHntYUwN51cFUIexXJXrBVqGHTLlBJ9HiwpMm8zSqhJzoZR o8T3d1ndn91WVOM2sPg5bntvegPK0d5nItOjmfjyID5SlHSGLI5BecF1gDs2mONc940N AzkBqF8rWjuuuw0Rv13o4mwAeCEcOLI9UhjawN9e/oiKP3z5ifr7DaT7VfVcdzXBlDxT 5dwFjaWhIMbAB9KOKCPEJ9u5n8fivYPdMYCFgzwwrNzHpzIZz9N1NZyoO6ikgNni4WES 7JE99SCiYhUO8jB3wnztLpVe0WoF7NfTviB486gRU/1gn1uSNVYuBbiSJNiylzrTyQO2 xxZg== X-Received: by 10.112.125.231 with SMTP id mt7mr5228295lbb.87.1443785140141; Fri, 02 Oct 2015 04:25:40 -0700 (PDT) In-Reply-To: <560D9539.2040009@case.edu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22b X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:11573 > 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