On Mon, Oct 15, 2012 at 08:08:10PM -0400, DJ Mills wrote:
> done < <(set -o)

Huh... that's interesting.  I wouldn't have expected it, but it turns
out you don't "lose" the value of errexit in a process substitution the
way you do in a command substitution.

imadev:~$ bash -c 'set -e; x=$(set +o); grep errexit <<<"$x"'
set +o errexit
imadev:~$ bash -c 'set -e; grep errexit <(set +o)'
set -o errexit

So, assuming Nikolai still wants to go with his current design, I guess
he could use code like this:

read -rd '' settings < <(set +o)
...
eval "$settings"

Reply via email to