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

Re: PATCH: expanding parameters like echo/print builtins



Bart wrote:
> I'd probably have done it with ${(%)arr:gs/%/%%} ... but I don't have
> any objection to the (g) flag except to wonder if another choice for
> the letter (g) might be better.  The fact that it mnemes to GETKEY_
> isn't going to be very helpful to most users.

Given that % is used for the (%) flag it might be logical to use \ here.
Or would it just be too confusing. It'd probably need quoting, right?

As for existing solutions, ${(Q)${(qqqq)var}//\\\\/\\} might do it.

Oliver



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