Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Alias named '='

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
--- 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)
+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