diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-05-13 16:08:35 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-05-13 16:08:35 +0000 |
commit | 547adf2021e2e57e421d27e5620170a8751d4274 (patch) | |
tree | c86db928284b551f8616bb76fc5263b8f9a8148b /Doc/Zsh/grammar.yo | |
parent | 8a30b5f0df3809bb70c28b786ac30e5cdd169693 (diff) | |
download | zsh-547adf2021e2e57e421d27e5620170a8751d4274.tar.gz zsh-547adf2021e2e57e421d27e5620170a8751d4274.tar.xz zsh-547adf2021e2e57e421d27e5620170a8751d4274.zip |
25018: Omari Norman: completion for awk, join, sort
Diffstat (limited to 'Doc/Zsh/grammar.yo')
-rw-r--r-- | Doc/Zsh/grammar.yo | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo index 05530bff2..fb07a63e2 100644 --- a/Doc/Zsh/grammar.yo +++ b/Doc/Zsh/grammar.yo @@ -479,6 +479,19 @@ 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. + +There is a commonly encountered problem with aliases +illustrated by the following code: + +example(alias echobar='echo bar'; echobar) + +This prints a message that the command tt(echobar) could not be found. +This happens because aliases are expanded when the code is read in; +the entire line is read in one go, so that when tt(echobar) is executed it +is too late to expand the newly defined alias. This is often +a problem in shell scripts, functions, and code executed with `tt(source)' +or `tt(.)'. Consequently, use of functions rather than aliases is +recommended in non-interactive code. texinode(Quoting)()(Aliasing)(Shell Grammar) sect(Quoting) cindex(quoting) |