Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Alias named '='
- X-seq: zsh-workers 41840
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Subject: Re: Alias named '='
- Date: Mon, 09 Oct 2017 15:49:20 +0100
- Cms-type: 201P
- In-reply-to: <20171008183756.h45qeeqqbn2wthh3@tarpaulin.shahaf.local2>
- 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
- Organization: Samsung Cambridge Solution Centre
- References: <6e3f43ea-45b0-d6a8-43b9-18845ea4edc9@necoro.eu> <m360bqt54h.fsf@luffy.cx> <7d8ab2fa-3130-1e43-8807-f94025fd62ed@necoro.eu> <CGME20171008183934epcas3p470fe7672a1689fa0e84d328d2ffaf2b1@epcas3p4.samsung.com> <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())'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author