diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Doc/Zsh/grammar.yo | 15 |
2 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index 61afa833a..b88933b68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-27 Peter Stephenson <pws@csr.com> + + * 28375: Doc/Zsh/grammar.yo: clarify how to quote aliases from + expansion. + 2010-10-25 Peter Stephenson <pws@csr.com> * 28363: Src/Zle/zle_refresh.c: inserting a character when a @@ -13786,5 +13791,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5114 $ +* $Revision: 1.5115 $ ***************************************************** 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: |