Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: auto-quoting inside braces in arguments
- X-seq: zsh-users 26530
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: auto-quoting inside braces in arguments
- Date: Thu, 18 Feb 2021 17:35:05 +0000
- Archived-at: <https://zsh.org/users/26530>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-users/2021-02/8b3a9f93-5eb4-4d4d-8312-58c371e12239%40www.fastmail.com>
- In-reply-to: <20210218134039.GA1492462@zira.vinc17.org>
- List-id: <zsh-users.zsh.org>
- References: <20210218134039.GA1492462@zira.vinc17.org>
Vincent Lefevre wrote on Thu, 18 Feb 2021 13:40 +00:00:
> Is there a way to get auto-quoting inside braces in arguments?
> For instance,
>
> echo {a b}
>
Proof of concept:
f() {
local l=\{ r=\}
CURSOR=${BUFFER[(i)$l]} MARK=${BUFFER[(i)$r]}
(( -- CURSOR ))
zle quote-region
}
> would give 2 words "echo" and "{a b}" (which is different from what
> a POSIX shell would give, but the behavior is already different
> anyway, as one gets a parse error otherwise). Obviously this rule
> should be applied only for arguments.
>
> Alternatively, one could have a feature like url-quote-magic.
>
> --
> Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
>
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author