Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Please help me quote ! :)
- X-seq: zsh-users 23179
- From: Martijn Dekker <martijn@xxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Please help me quote ! :)
- Date: Mon, 26 Feb 2018 20:36:19 +0000
- In-reply-to: <20180226175037.hgrrnft44wjx3so7@solfire>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20180226175037.hgrrnft44wjx3so7@solfire>
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