[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: temp setting POSIXLY_CORRECT turns alias expansion off
From: |
Chet Ramey |
Subject: |
Re: temp setting POSIXLY_CORRECT turns alias expansion off |
Date: |
Thu, 16 Jan 2020 11:02:43 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
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/