help-bash
[Top][All Lists]
Advanced

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

Re: $${a,b} brace expansion flaw.


From: Kaz Kylheku
Subject: Re: $${a,b} brace expansion flaw.
Date: Sat, 20 Jan 2024 11:19:27 -0800
User-agent: Roundcube Webmail/1.4.15

On 2024-01-20 08:33, Kaz Kylheku wrote: 
> (Or maybe it was considered and omitted for some good reasons;
> I'd have to look at the code: comments, anything in its history
> or other details.)

There are subtleties. We would like $${a,b} to expand,
but not \$${a,b}. We have to be sure that the if there are
two $ before brace expansion, they are both unescaped, so
that they denote the the PID syntax. The first $ must not be
part of any other syntax, like $$${a,b}. Given
$$$$$$$$$${a,b}, if there is an even number of dollar signs,
we expand {a,b} as brace expansion, otherwise not.
That's not even considering mixtures of backslashed $
and plain. $$$\$$$\$$$$$$\$$$$$\$\$$${a,b}. Expand or not?

Hot mess! :)



reply via email to

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