[Pkg-zsh-devel] Bug#517008: alias not expanded with zsh -c
Christian Heinrich
com-debian at gladbachcity.de
Thu Mar 10 11:23:38 UTC 2016
Hi,
I just verified that this patch was included in the latest ZSH package
in Stretch. Am I correct that this (pretty old) issue can actually be
closed as resolved?
Best
Christian
On Thu, 26 Mar 2009 09:50:29 +0000 Peter Stephenson <pws at csr.com>
wrote:
> On Wed, 25 Mar 2009 17:14:31 -0700
> Bart Schaefer <schaefer at brasslantern.com> wrote:
> > On Mar 25, 6:20pm, Peter Stephenson wrote:
> > }
> > } But yes, I share your feeling that this isn't a particularly
vital
> > } addition, it just looked easy to do like other shells in
compatability
> > } mode, which is the point of that.
> >
> > It just seems to me that we're potentially penalizing a script that
does
> > not use aliases in the can't-open-tempfile case in order to support
a
> > script that does not use aliases.
> >
> > Given potential security problems with using tempfiles and the
likelyhood
> > of a script using an alias vs. the likelyhood of file creation
failing,
> > which case ought we be catering too?
>
> From what I've heard, it doesn't sound like it's worth more than a
> warning.
>
> Index: Doc/Zsh/options.yo
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Doc/Zsh/options.yo,v
> retrieving revision 1.78
> diff -u -r1.78 options.yo
> --- Doc/Zsh/options.yo 3 Mar 2009 17:35:29 -0000 1.78
> +++ Doc/Zsh/options.yo 26 Mar 2009 09:49:05 -0000
> @@ -1721,7 +1721,12 @@
>
> 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.
> +other piece of shell code evaluated 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.
> )
> pindex(POSIX_BUILTINS)
> pindex(NO_POSIX_BUILTINS)
>
>
> --
> Peter Stephenson <pws at csr.com> Software Engineer
> CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
> Cambridge, CB4 0WZ, UK Tel: +44 (0)1223
692070
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-zsh-devel/attachments/20160310/34996f50/attachment.sig>
More information about the Pkg-zsh-devel
mailing list