2017-03-03 08:27:03 -0500, Chet Ramey: > On 3/1/17 4:58 PM, Stephane Chazelas wrote: > > > BTW, there seems to have been a regression in the handling of the -O > > option to the bash interpreter: > > Thanks, I'll take a look. It looks to be specific to the various > compat* options. [...]
See also: $ POSIXLY_CORRECT=1 bash -c 'set +o posix; set +o' | grep posix set +o posix $ POSIXLY_CORRECT=1 bash +o posix -c 'set +o' | grep posix set -o posix (not a regression, already in 4.3) I'd expect explicit command line options to take precedence over the environment. Another oddity: $ env SHELLOPTS= bash -o posix -c : $ env SHELLOPTS= bash +o posix -c : bash: SHELLOPTS: readonly variable -- Stephane