Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [SOLVED] Libtool/zsh quoting problem: a zsh... bug?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 11 February 2006 12:36, DervishD wrote:
>
> The problem is that zsh does word splitting in this construct:
>
> ${1+"$@"}
>
See this thread: <http://www.zsh.org/mla/workers/2002/msg00542.html>; there
was an attempt to fix it in 16949 but apparently it was incomplete and never
went in.
> I don't know if this can be considered a zsh bug or not. The SUS
> standard says that field splitting is done after parameter expansion,
> so I think it should be done on the above expansion. Unfortunately,
> Bash doesn't seem to do it.
>
bash is right and zsh is not.
> Anyway, the above construct doesn't look useful to me. I mean, if
> $1 is set, we substitute all available arguments. If it is unset, we
> don't substitune anything. So, this is equivalent to just
> substituting "$@", and zsh doesn't perform word splitting on that...
>
> I'm thinking about submitting a patch to the libtool people, with
> something like this:
>
> alias -g '${1+"$@"}'='"$@"'
>
The funny part of it is that autoconf includes exactly the above workaround
since quoted thread; this is also documented in autoconf info.
> I know, that's a dirty hack, but I cannot think about any other
> fix (except "fixing" zsh itself, although I'm not sure this is a
> bug).
>
> Any suggestion???
>
Fix a bug in zsh :)
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD7bq7R6LMutpd94wRAv9pAKDR4e7JsNgsehnc1ROJMudjQpUHJwCgyj1H
ZXCpGBkuMvDaZYHRFUoXty0=
=VLVF
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author