From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Re: Alias named '='
Date: Mon, 09 Oct 2017 15:49:20 +0100 [thread overview]
Message-ID: <20171009154920.017a6d87@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20171008183756.h45qeeqqbn2wthh3@tarpaulin.shahaf.local2>
Should we say something like this, or is it simply adding more words for
people to say they can't be bothered to read it?
pws
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index 463ac88..c77a9a8 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -568,6 +568,16 @@ itemiz(With global aliasing, any command separator, any redirection
operator, and `tt(LPAR())' or `tt(RPAR())' when not part of a glob pattern)
enditemize()
+Anything not listed is em(not) a word and no attempt is made to expand
+it as an alias, however it is defined (i.e. via the builtin or
+the special parameter tt(aliases) described in
+ifnzman(noderef(The zsh/parameter Module))\
+ifzman(the section THE ZSH/PARAMETER MODULE in zmanref(zshmodules))).
+For example, an expression containing an tt(=) at the start of
+a command line is always an assignment and cannot be expanded as an alias.
+However, the shell does not attempt to deduce whether the string
+corresponds to a word at the time the alias is created.
+
It is not presently possible to alias the `tt(LPAR()LPAR())' token that
introduces arithmetic expressions, because until a full statement has been
parsed, it cannot be distinguished from two consecutive `tt(LPAR())'
next parent reply other threads:[~2017-10-09 14:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6e3f43ea-45b0-d6a8-43b9-18845ea4edc9@necoro.eu>
[not found] ` <m360bqt54h.fsf@luffy.cx>
[not found] ` <7d8ab2fa-3130-1e43-8807-f94025fd62ed@necoro.eu>
[not found] ` <CGME20171008183934epcas3p470fe7672a1689fa0e84d328d2ffaf2b1@epcas3p4.samsung.com>
[not found] ` <20171008183756.h45qeeqqbn2wthh3@tarpaulin.shahaf.local2>
2017-10-09 14:49 ` Peter Stephenson [this message]
2017-10-09 15:04 ` Daniel Shahaf
2017-10-09 15:20 ` Peter Stephenson
2017-10-09 15:30 ` Bart Schaefer
2017-10-09 15:35 ` Daniel Shahaf
2017-10-10 9:02 ` Peter Stephenson
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=20171009154920.017a6d87@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=zsh-workers@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).