Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
On the quoting of braces
- X-seq: zsh-workers 29951
- From: Christian Neukirchen <chneukirchen@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: On the quoting of braces
- Date: Tue, 06 Dec 2011 23:16:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=RnG8CxuH3LinEtaq8JdKJP9MNcFIh8Z1RJGm0tk0ptI=; b=TNFFRyFxEU+4qt7zwutiPYFfmeNg2s2ptWXsSXXr5f/mkZPguaaGxEUgEGZ8RWY8p9 A/viVPuwGb0vCGVkxFYlsYzXynsYx6zx8CVt6+3X81b6FR+R5S6LUAXanu68YLVsCbEy NssGCjpprRRPHW2tUqXrTt7nQNdpJ4WNKItgQ=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hi,
comparing different shells, I noticed zsh is overly careful for unquoted
braces:
ksh93$ echo {}
{}
ksh93$ echo {foo}
{foo}
ksh93$ echo {foo,bar}
foo bar
ksh93$ echo { foo,bar }
{ foo,bar }
bash4$ echo {}
{}
bash4$ echo {foo}
{foo}
bash4$ echo {foo,bar}
foo bar
bash4$ echo { foo,bar }
{ foo,bar }
zsh% echo {}
{}
zsh% echo {foo}
{foo}
zsh% echo {foo,bar}
foo bar
zsh% echo { foo,bar }
zsh: parse error near `}'
Why does this error appear? The only way to disable it seems to be
IGNORE_BRACES, which completely disables (the much used) brace expansion.
("disable -r '}'" would break "{ cmd; cmd2 }")
Thanks,
--
Christian Neukirchen <chneukirchen@xxxxxxxxx> http://chneukirchen.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author