Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#517008: alias not expanded with zsh -c
- X-seq: zsh-workers 26797
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#517008: alias not expanded with zsh -c
- Date: Thu, 26 Mar 2009 15:18:43 +0000
- In-reply-to: <090326081259.ZM9239@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <20090225022850.GA4841@xxxxxxxxxxxxxxxxxxx> <20090325145418.GB9330@xxxxxxxx> <200903251630.n2PGU8sK013449@xxxxxxxxxxxxxx> <20090325172509.79c53d4d@news01> <090325111130.ZM7836@xxxxxxxxxxxxxxxxxxxxxx> <200903251820.n2PIK6JI016478@xxxxxxxxxxxxxx> <090325171431.ZM8037@xxxxxxxxxxxxxxxxxxxxxx> <20090326095029.52a8ce33@news01> <090326081259.ZM9239@xxxxxxxxxxxxxxxxxxxxxx>
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