Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: tilde expansion after quoted : in assignments



On Fri, Apr 30, 2021 at 1:18 AM Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
>
> Tilde expansion is only meant to be done after unquoted : per
> POSIX. Though I can't imagine being a problem in practice.

I was expecting this to mean that colons in e.g. $PATH could be
escaped with a backslash, but that's not the case.

Therefore I suppose it's so that one can do
  a=${this}\:${that}
without having to worry whether $that begins with a tilde, while
simultaneously allowing ${that} to be whitespace-split or to itself
contain unquoted colons.  Although again that seems a pretty weird
case since the only reason to care whether those colons are quoted is
if they are followed by more tildes and I can't imagine what splitting
makes sense in that context.




Messages sorted by: Reverse Date, Date, Thread, Author