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


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

Re: Saving/restoring of posix option unsets expand_aliases

Started byChet Ramey <chet.ramey@case.edu>
First post2019-11-25 15:02 -0500
Last post2019-11-25 15:02 -0500
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 Chet Ramey <chet.ramey@case.edu> - 2019-11-25 15:02 -0500

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

FromChet Ramey <chet.ramey@case.edu>
Date2019-11-25 15:02 -0500
SubjectRe: Saving/restoring of posix option unsets expand_aliases
Message-ID<mailman.2614.1574712162.13325.bug-bash@gnu.org>
On 11/24/19 7:35 AM, Ulrich Mueller wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: x86_64-pc-linux-gnu-gcc
> Compilation CFLAGS: -march=native -ggdb -O2 -pipe -Wno-parentheses -Wno-format-security
> uname output: Linux themis 4.14.154-gentoo #1 SMP Sat Nov 16 15:00:00 CET 2019 x86_64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz GenuineIntel GNU/Linux
> Machine Type: x86_64-pc-linux-gnu
> 
> Bash Version: 5.0
> Patch Level: 11
> Release Status: release
> 
> 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.

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.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


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


csiph-web