Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15646 > unrolled thread

Re: Saving/restoring of posix option unsets expand_aliases

Started byUlrich Mueller <ulm@gentoo.org>
First post2019-11-26 01:34 +0100
Last post2019-11-26 01:34 +0100
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Saving/restoring of posix option unsets expand_aliases Ulrich Mueller <ulm@gentoo.org> - 2019-11-26 01:34 +0100

#15646 — Re: Saving/restoring of posix option unsets expand_aliases

FromUlrich Mueller <ulm@gentoo.org>
Date2019-11-26 01:34 +0100
SubjectRe: Saving/restoring of posix option unsets expand_aliases
Message-ID<mailman.2652.1574729073.13325.bug-bash@gnu.org>
>>>>> On Mon, 25 Nov 2019, Chet Ramey wrote:

> On 11/24/19 7:35 AM, Ulrich Mueller wrote:
>> Description:
>> In a non-interactive non-posix-mode shell, saving the output of
>> "shopt -p -o" and restoring it will unset the expand_aliases option.

> It seems like setting posix mode when it's already set, or unsetting
> it when it's not, should be a no-op instead of guaranteeing a certain
> environment (posix or default). That's easy enough.

Right, this is where I think that the current behavior is a bug.

> There's no question that setting posix mode should change the values
> of a number of bash options to produce a compliant environment.

> It's a different question whether or not unsetting posix mode should
> revert to the settings before posix mode was enabled or restore the
> default environment. It's always meant the latter.

No strong opinion about that one, but maybe the latter is the more
predictable behavior?

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web