Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15630
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!feeder7.news.weretis.net!news.unit0.net!fu-berlin.de!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Ulrich Mueller <ulm@gentoo.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Saving/restoring of posix option unsets expand_aliases |
| Date | Sun, 24 Nov 2019 13:35:20 +0100 |
| Lines | 39 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.2496.1574598945.13325.bug-bash@gnu.org> (permalink) |
| References | <w6g1rtxjvuf.fsf@kph.uni-mainz.de> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| X-Trace | usenet.stanford.edu 1574598946 16477 209.51.188.17 (24 Nov 2019 12:35:46 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 2001:470:ea4a:1:5054:ff:fec7:86e4 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <w6g1rtxjvuf.fsf@kph.uni-mainz.de> |
| Xref | csiph.com gnu.bash.bug:15630 |
Show key headers only | View raw
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.
Repeat-By:
Execute the following script:
#!/bin/bash
shopt -s expand_aliases
save=$(shopt -p -o)
shopt -p expand_aliases
eval "${save}"
shopt -p expand_aliases
Here, its output is:
shopt -s expand_aliases
shopt -u expand_aliases
AFAICS, this is caused by eval unsetting the "posix" option (even though
it wasn't set before). Function set_posix_mode calls sv_strict_posix,
which in turn calls posix_initialize, which sets expand_aliases and
other options.
Expected behavior: Saving and restoring of options shouldn't change
other options by side effect.
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Saving/restoring of posix option unsets expand_aliases Ulrich Mueller <ulm@gentoo.org> - 2019-11-24 13:35 +0100
csiph-web