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

Re: auto-quoting inside braces in arguments



On Thu, Feb 18, 2021 at 10:57 AM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> Given the deep desire of shells to strip and interpret quotes

You're still misinterpreting this.  It's pretty straightforward:
-- quotes are interpreted ONCE when the command line is processed.
-- the only time quotes are ever interpreted AGAIN is with "eval".

Stop "eval"-ing things and you'll stop having problems.

If for some reason "eval" is absolutely necessary, THEN you need to
assess what quoting interpretation you WOULD have used if the
argument(s) to eval were the original command line, and re-apply those
quotes, which zsh makes possible with ${(q)...} or ${(qqq)...} or
whatever.




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