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

Re: Bug#517008: alias not expanded with zsh -c



On Thu, 26 Mar 2009 08:12:59 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Is it obvious enough that "evaluated as one unit" and "parsed in one go"
> mean the same thing?  And should that be tt(sh -c) rather than zsh?

"parsed as one unit" might be better.

Index: Doc/Zsh/options.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/options.yo,v
retrieving revision 1.79
diff -u -r1.79 options.yo
--- Doc/Zsh/options.yo	26 Mar 2009 09:53:27 -0000	1.79
+++ Doc/Zsh/options.yo	26 Mar 2009 15:17:35 -0000
@@ -1721,12 +1721,13 @@
 
 Alias expansion takes place while text is being read; hence when this
 option is set it does not take effect until the end of any function or
-other piece of shell code evaluated as one unit.  Note this may
+other piece of shell code parsed as one unit.  Note this may
 cause differences from other shells even when the option is in
-effect.  For example, when running a command with `tt(zsh -c)' the
-entire command argument is parsed in one go, so aliases defined within
-the argument are not available even in later lines.  If in doubt, avoid use
-of aliases in non-interactive code.
+effect.  For example, when running a command with `tt(zsh -c)',
+or even `tt(zsh -o posixaliases -c)', the entire command argument is parsed
+as one unit, so aliases defined within the argument are not available even
+in later lines.  If in doubt, avoid use of aliases in non-interactive
+code.
 )
 pindex(POSIX_BUILTINS)
 pindex(NO_POSIX_BUILTINS)

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author