On 1/31/22 11:40 PM, Martijn Dekker wrote:
On the latest code from the devel branch:
GNU bash, versie 5.2.0(35)-alpha (x86_64-apple-darwin18.7.0)
Reproducer script:
shopt -s expand_aliases
alias let='let --'
set -x
let '1 == 1'
: $(let '1 == 1')
Output:
+ let -- '1 == 1'
++ let -- -- '1 == 1'
On 2/1/22 10:23 AM, Chet Ramey wrote:
If you defer alias expansion until execution, you lose the (posix-
encouraged but officially unspecified according to the approved
interpretation of issue 1342) ability to have aliases affect command
parsing in the command substitution:
Well, I went back a
you'd expand an alias if seen and then reinterpret the whats gotten also to
( possible ) current cmdline before alias
its hard to limit this to one cmd per chunk only
you, 1. expand alias 2. it expanded to multiple complex cmds 3. bash parses
the resulting text and does its per cmd recieved works
On Tue, Feb 1, 2022, 19:11 Chet Ramey wrote:
> On 2/1/22 10:23 AM, Chet Ramey wrote:
>
> > If you defer alias expansion until execution, you lose the (posix-
> > encouraged but officially unspecified according to the approved
> > interpretation of issue 1342) ability to have aliases affect comman
On Tue, Feb 1, 2022, 19:16 Alex fxmbsw7 Ratchev wrote:
>
>
> On Tue, Feb 1, 2022, 19:11 Chet Ramey wrote:
>
>> On 2/1/22 10:23 AM, Chet Ramey wrote:
>>
>> > If you defer alias expansion until execution, you lose the (posix-
>> > encouraged but officially unspecified according to the approved
>>
On Tue, Feb 1, 2022, 19:25 Alex fxmbsw7 Ratchev wrote:
> you'd expand an alias if seen and then reinterpret the whats gotten also
> to ( possible ) current cmdline before alias
>
as with multiple heredocs in complex cmds
{
cmd "$( < /dev/fd/4 )" "$( < /dev/fd/3 )"
} 4<
> its hard to limit this
Date:Tue, 1 Feb 2022 10:23:53 -0500
From:Chet Ramey
Message-ID: <1e33f111-b9ff-2d70-adf8-934906321...@case.edu>
| Historically, bash (and ksh93) has favored the former. Just about all the
| other shells claiming some sort of POSIX conformance favor the latter (all
Date:Tue, 1 Feb 2022 15:39:06 -0500
From:Chet Ramey
Message-ID: <2816cf78-d7be-b9e1-733d-12427b04c...@case.edu>
| When you say "just parsed," when are aliases expanded?
During lexical analysis, right between when the input is read (if it
is read, and isn't from som
On 2/1/22 1:47 PM, Robert Elz wrote:
Date:Tue, 1 Feb 2022 10:23:53 -0500
From:Chet Ramey
Message-ID: <1e33f111-b9ff-2d70-adf8-934906321...@case.edu>
| Historically, bash (and ksh93) has favored the former. Just about all the
| other shells claiming some sor