about summary refs log tree commit diff
path: root/Doc/Zsh/grammar.yo
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-10-27 11:28:29 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-10-27 11:28:29 +0000
commite27a65dd6c4181b9d75f6209d4e34201ad432df4 (patch)
tree3cec2260cee272c3cccf4e0e754e3ffcf7f3da8b /Doc/Zsh/grammar.yo
parent73d622e9c48519b4781120d154b868df882c0bbd (diff)
downloadzsh-e27a65dd6c4181b9d75f6209d4e34201ad432df4.tar.gz
zsh-e27a65dd6c4181b9d75f6209d4e34201ad432df4.tar.xz
zsh-e27a65dd6c4181b9d75f6209d4e34201ad432df4.zip
28375: clarify how to quote aliases from expansion
Diffstat (limited to 'Doc/Zsh/grammar.yo')
-rw-r--r--Doc/Zsh/grammar.yo15
1 files changed, 9 insertions, 6 deletions
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index a8e223bb9..b8b20beed 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -477,12 +477,15 @@ cindex(aliases, global)
 An alias is defined using the tt(alias) builtin; global aliases
 may be defined using the tt(-g) option to that builtin.
 
-Alias expansion is done on the shell input before any
-other expansion except history expansion.  Therefore,
-if an alias is defined for the word tt(foo), alias expansion
-may be avoided by quoting part of the word, e.g. tt(\foo).
-But there is nothing to prevent an alias being defined
-for tt(\foo) as well.
+Alias expansion is done on the shell input before any other expansion
+except history expansion.  Therefore, if an alias is defined for the
+word tt(foo), alias expansion may be avoided by quoting part of the
+word, e.g. tt(\foo).  But there is nothing to prevent an alias being
+defined for tt(\foo) as well.  For use with completion, which would
+remove an initial backslash following by a character that isn't special,
+it may be more convenient to quote the word by starting with a single
+quote, i.e. tt('foo); completion will automatically add the trailing
+single quote.
 
 There is a commonly encountered problem with aliases
 illustrated by the following code: