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

Re: Please help me quote ! :)



Op 26-02-18 om 17:50 schreef tuxic@xxxxxxxxx:
> is there a way to automatically escape all "bad" characters
> (like spaces) while expanding a shell variable containing a
> "bad" filename?

Yes. See 'man zshexpn' under the heading "Parameter Expansion Flags".
The flag you need is the "q" flag. For instance, instead of $var, use
${(q)var}. See the man page for how to tweak the quoting format.

HTH,

- M.



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