From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: not an error?
Date: Thu, 8 Oct 2015 12:22:36 -0700 [thread overview]
Message-ID: <151008122236.ZM4177@torch.brasslantern.com> (raw)
In-Reply-To: <5616AB69.8080706@eastlink.ca>
On Oct 8, 10:44am, Ray Andrews wrote:
}
} print -rl "${(@k)aliases}}"
}
} Shouldn't the parser complain about the extra '}'?
Why would it? You've put it in double quotes, so this is the same
situation as
print -rl "}"
} certainly complains about too many opening '{', tho.
Consider
print -rl "{${(@k)aliases}}"
print -rl "${(@k)aliases}{}"
print -rl "${(@k)aliases}}{"
Given the quotes, the only reason too many open braces is a problem is
when you are inside the syntax of ${...} where braces are significant.
As soon as a matching close-brace is found, double-quote context is
active again and braces cease to have meaning.
next prev parent reply other threads:[~2015-10-08 19:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 7:51 Matching beginning and end of word Sebastian Gniazdowski
2015-10-08 9:23 ` Peter Stephenson
2015-10-08 16:46 ` Bart Schaefer
2015-10-08 17:44 ` not an error? Ray Andrews
2015-10-08 19:22 ` Bart Schaefer [this message]
2015-10-08 19:56 ` Ray Andrews
2015-10-08 20:14 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=151008122236.ZM4177@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).