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: Thu, 3 Feb 2022 13:52:58 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1

On 2/2/22 8:18 PM, L A Walsh wrote:

However w/r/t starting
with aliases being enabled by default when bash starts (interactive or not),
I would prefer bash follow posix rules.

You have a preference that can easily be satisfied by running bash with the
appropriate option enabled. It's not a problem for interactive shells; it's
only a problem for scripts, and you have multiple options for dealing with
that.


While I compile my bash to follow posix rules, I can't quite write my
general scripts to expect that as bash at the trunc level

What does `trunc level' mean?


My posix non-conformance issue has to do with bash not starting with
aliases enabled by default in all default invocations.

Yep, that's one of the documented differences between default and posix
modes. Bash has never, and I mean never, going all the way back to 1988,
expanded aliases in non-interactive shells by default.

While BASH_ALIASES is inherited
What does this mean?


For that matter I can't expect my own maps (arrays with non-integer or integer
to work in child processes.

True, bash has never exported array variables.

I've tried to suggest various improvements over the years, and don't
understand the resistance of all the suggestion.

Feature suggestions (not bug fixes) are evaluated against general
usability, implementation effort, and ongoing maintenance work. The time
spent implementing something -- or incorporating donated code -- has to
balance the benefit and resources I have available.

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