bug-bash
[Top][All Lists]
Advanced

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

Re: Probably not a bug but I was surprised: $' does not work inside "...


From: Dale R. Worley
Subject: Re: Probably not a bug but I was surprised: $' does not work inside "..." close.
Date: Thu, 18 Mar 2021 21:09:19 -0400

Greg Wooledge <greg@wooledge.org> writes:
> $'...' is a form of quoting, not an expansion.  It won't "work" inside
> of another type of quoting, just like '...' will not "work" inside "...".

Yes, that's true, and makes sense when I think about it.  But the
manual page doesn't consistently phrase it that way:

       Words of the form $'string' are treated specially.  The word expands to
       string,  ...

As you say, it isn't "expand".  And, being a quote construct, it's not a
word per se, it prevents contained characters from breaking words.

On the flip side, it doesn't look like there's a consistent word for
"the effective value of a quote construct", although "quote removal" is
used in some places.

Dale



reply via email to

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