[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: errexit lost in command substitution

From: Chet Ramey
Subject: Re: errexit lost in command substitution
Date: Tue, 11 Jan 2005 10:52:16 -0500

> > > Bug or feature?
> > 
> > Feature.  Command substitution has not inherited the -e option for a
> > very long time (certainly since before bash-2.0 was released, around
> > eight years ago).  In posix mode, the setting is inherited, since that's
> > what I interpret POSIX to say.
> [...]
> Thanks for that.
> Is it the only changing?

What does that mean?

> saved_options=$(
>   set +o
>   shopt -p
> )
> [[ -o errexit ]] && saved_options="
> $saved_options
> set -o errexit"
> Can I assume that to correctly backup the current option
> setting?

Looks right.

> While I'm at it, it seems that the --wordexp option is not
> documented.

True.  It's useless unless you have a C library that uses bash to implement
wordexp(), which is why it's undocumented.


``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Chet Ramey, ITS, CWRU    address@hidden    http://tiswww.tis.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]