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


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

Re: temp setting POSIXLY_CORRECT turns alias expansion off

Started byChet Ramey <chet.ramey@case.edu>
First post2020-01-16 11:02 -0500
Last post2020-01-16 11: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: temp setting POSIXLY_CORRECT turns alias expansion off Chet Ramey <chet.ramey@case.edu> - 2020-01-16 11:02 -0500

#15808 — Re: temp setting POSIXLY_CORRECT turns alias expansion off

FromChet Ramey <chet.ramey@case.edu>
Date2020-01-16 11:02 -0500
SubjectRe: temp setting POSIXLY_CORRECT turns alias expansion off
Message-ID<mailman.2735.1579190588.1979.bug-bash@gnu.org>
On 1/15/20 10:24 PM, Martijn Dekker wrote:
> When alias expansion is enabled for a script in bash native mode, prefixing 
> POSIXLY_CORRECT=y to any command will turn alias expansion globally off. 
> This is a bug because the assignment should only have effect on that command.

You're probably right, but it's an interesting question.

The idea is that

POSIXLY_CORRECT=y true

is essentially equivalent (assuming POSIXLY_CORRECT is not already set) to

POSIXLY_CORRECT=y ; true; unset POSIXLY_CORRECT

and turning off posix mode resets a default environment.


-- 
``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