bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incorrect alias expansion within command substitution


From: Chet Ramey
Subject: Re: Incorrect alias expansion within command substitution
Date: Wed, 2 Feb 2022 11:50:37 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1

On 2/2/22 8:25 AM, L A Walsh wrote:

> I.e. My bash is posix compliant by default w/r/t aliases:

It's not, and that's how this whole issue got started. You're running
bash-4.4. POSIX requires the following to work:

alias switch=case
echo $(switch foo in foo) echo ok 2;; esac )

and it simply doesn't, whether you run in posix mode or not.

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]