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    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to