Zsh Mailing List Archive
Messages sorted by:
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: <firstname.lastname@example.org>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <email@example.com> <firstname.lastname@example.org> <email@example.com> <CGME20171008183934epcas3p470fe7672a1689fa0e84d328d2ffaf2b1@epcas3p4.samsung.com> <firstname.lastname@example.org>
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?
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index 463ac88..c77a9a8 100644
@@ -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)
+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: