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


Groups > gnu.bash.bug > #15639

Re: Saving/restoring of posix option unsets expand_aliases

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Saving/restoring of posix option unsets expand_aliases
Date Mon, 25 Nov 2019 15:02:13 -0500
Lines 35
Approved bug-bash@gnu.org
Message-ID <mailman.2614.1574712162.13325.bug-bash@gnu.org> (permalink)
References <w6g1rtxjvuf.fsf@kph.uni-mainz.de> <5db52484-0586-0225-7f14-43cc799372c6@case.edu>
Reply-To chet.ramey@case.edu
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1574712163 14222 209.51.188.17 (25 Nov 2019 20:02:43 GMT)
X-Complaints-To action@cs.stanford.edu
Cc chet.ramey@case.edu
To Ulrich Mueller <ulm@gentoo.org>, bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1574712143; bh=1uPguFZrrijTIo0hAWheM8WgeKAruJQiC8asnU4AKLM=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=n6HlhH1m8/soZjl78Ow9sUAZ+clRXablYSB34YFvAQP48gChRnx4/WLdSz92ngO91q vGisQAbB626x/AkYDC/5B/OYYCNXamePYqtkJ4Tt7Yo9onAhTJgKg3CPeR8IdAN1MGH EvUd05xEmWPkf/4Itiopks1CUDf6gsV6ubOFEnYZ2bVLa+MGBbdD0+HN5eOwBCg1Rqa DidLv7mQYWNQSkQ8CsmEIWQrczMp5TjEUSrN+Touo99bESEaXF4+1C4WV/5jl86GJzu qMG/EiHh4tDG0PRkmOOrwBG6GdGSBxgMncl9ur5o1GhXtLlWuvjvnCXtZ2R2orWuEuB KqdmexCg==
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=case.edu; s=smtp-primary; t=1574712135; bh=Q0skmTFP0vbH980zGZVQ7plYSRhepQgpHU4ouK6+kCo=; h=Reply-To:Cc:Subject:To:References:From:Message-ID:Date: MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=X5WrcYbeUrW91EcwJEB2fSF1D48nSb/46gegSOUZRDEsky9BK7/zehelpFDUYeszLr AcscE6axvPJp/7iGaaNY3C9XqMKFMJkUQEldhhFbjZLf4t/wK3Zgfry9fb78rmQB53v DDoGM1Qyp4qpUyWHBnsJs/tMMuAg9BIH58i7+TaVl+j6JFOQn0B80RMxAgOGSWLqC3m +PdBycxjMyljppzcbc88Vb7xlwA0PV1DK2I3ot0Cx5yje1Ae7POHf4UK9vWpVezMbvC RC+58wn03EoIOJdhaQORiehgeDdNJXJZspzBMIA2yS52tzoAyoHJ003hC44GVy7FyIB iIXNWakQ==
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.2.2
In-Reply-To <w6g1rtxjvuf.fsf@kph.uni-mainz.de>
Content-Language en-US
X-Junkmail-Status score=7/90, host=mpv3-2015.case.edu
X-Junkmail-PrAS-Raw score=7/90, refid=2.7.2:2019.11.25.184217:17:7.944, ip=, rules=DKIM_SIGNATURE, __HAS_REPLYTO, __HAS_CC_HDR, __SUBJ_REPLY, __BOUNCE_CHALLENGE_SUBJ, __BOUNCE_NDR_SUBJ_EXEMPT, __TO_MALFORMED_2, __TO_NAME, __TO_NAME_DIFF_FROM_ACC, __HAS_REFERENCES, __REFERENCES, __HAS_FROM, FROM_EDU_TLD, __HAS_MSGID, __SANE_MSGID, DATE_TZ_NA, __USER_AGENT, __MOZILLA_USER_AGENT, __MIME_VERSION, __IN_REP_TO, __CT, __CT_TEXT_PLAIN, __CTE, __REPLYTO_SAMEAS_FROM_ADDY, __REPLYTO_SAMEAS_FROM_ACC, __FROM_DOMAIN_IN_ANY_CC1, __FROM_DOMAIN_IN_ANY_CC2, __REPLYTO_SAMEAS_FROM_DOMAIN, __DKIM_ALIGNS_1, __DKIM_ALIGNS_2, __ANY_URI, __URI_MAILTO, __URI_WITH_PATH, __URI_NO_WWW, __CP_URI_IN_BODY, __SUBJ_ALPHA_NEGATE, __URI_IN_BODY, __URI_NOT_IMG, __FORWARDED_MSG, __BODY_NO_MAILTO, __NO_HTML_TAG_RAW, BODYTEXTP_SIZE_3000_LESS, BODY_SIZE_1400_1499, __MIME_TEXT_P1, __MIME_TEXT_ONLY, __URI_NS, SXL_IP_TFX_WM[202.103.22.129.fur], HTML_00_01, HTML_00_10, [TRUNCATED], so=2010-03-03 19:42:08, dmn=2016-08-03-0138
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy]
X-Received-From 129.22.103.194
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 <5db52484-0586-0225-7f14-43cc799372c6@case.edu>
X-Mailman-Original-References <w6g1rtxjvuf.fsf@kph.uni-mainz.de>
Xref csiph.com gnu.bash.bug:15639

Show key headers only | View raw


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/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: Saving/restoring of posix option unsets expand_aliases Chet Ramey <chet.ramey@case.edu> - 2019-11-25 15:02 -0500

csiph-web