zsh-workers
 help / color / mirror / code / Atom feed
From: DervishD <zsh@dervishd.net>
To: Andrey Borzenkov <arvidjaar@newmail.ru>,
	Zsh-workers <zsh-workers@sunsite.dk>
Subject: Re: [SOLVED] Libtool/zsh quoting problem: a zsh... bug?
Date: Sat, 11 Feb 2006 13:06:23 +0100	[thread overview]
Message-ID: <20060211120623.GB13513@DervishD> (raw)
In-Reply-To: <20060211113325.GB9019@fargo>

    Hi David :)

 * David <david@pleyades.net> dixit:
> On Feb 11 at 12:06:30, DervishD wrote:
> >     The problem is that libtool doesn't use "${1+... but just $1+...,
> > without quotes, so the splitting *should* be done. That's why I think
> > bash is wrong here and zsh is right.
> > 
> >     Anyway, if the people at autoconf used the "alias -g" solution,
> > libtool people could, too...
> 
> Thanks a lot for your help, i'd never find out this problem by myself ;).

    You're more than welcome. Thanks for reporting the problem.
Unfortunately libtool is heavily used nowadays, so many people is
going to be bitten by this bug if they use Zsh as /bin/sh (as I do).

> In fact i'm still trying to understand it :), because for me that ${1+"$@"}
> construct is bit weird...

    Some shells (ugly, old shells) doesn't treat "$@" (double quoted)
as "nothing", as the SUS standard says. Instead, they treat the
expression above as "" (and empty pair of double quotes), which is
not exactly "nothing". Well, to work around this, you always can use
this: ${1+"$@"}, what will *correctly* substitute "nothing" if no
parameters are available (that is, when $@ is empty). Unfortunately,
zsh does field splitting on the above, but bash doesn't. The libtool
script does heavy use of the above construct, and I think it can be
avoided most of the time, but I NOT going to hack libtool, the code
is a nightmare.

    If the libtool people accept the patch, well, then there is a
possibility. Otherwise... The patch is not very intrusive, and anyway
they are already doing a couple of things under Zsh, so...

    I've prepared the patch and it works with littlecms. Now I have
to check libtool pristine sources ;)

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to... RAmen!


  reply	other threads:[~2006-02-11 12:05 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-09 23:32 Libtool/zsh quoting problem David Gómez
2006-02-10  8:46 ` DervishD
2006-02-10  9:48   ` David Gómez
2006-02-10 11:34     ` DervishD
2006-02-10 12:56       ` David Gómez
2006-02-10 14:25         ` DervishD
2006-02-10 18:27           ` David Gómez
2006-02-10 19:31             ` DervishD
2006-02-11  9:36 ` [SOLVED] Libtool/zsh quoting problem: a zsh... bug? DervishD
2006-02-11 10:21   ` Andrey Borzenkov
2006-02-11 11:06     ` DervishD
2006-02-11 11:33       ` David Gómez
2006-02-11 12:06         ` DervishD [this message]
2006-02-11 12:28       ` Andrey Borzenkov
2006-02-11 18:07         ` DervishD
2006-02-11 12:21     ` DervishD
2006-02-11 18:14     ` Wayne Davison
2006-02-11 18:22       ` DervishD
2006-02-11 18:58         ` Wayne Davison
2006-02-11 19:42       ` Bart Schaefer
2006-02-12  4:50         ` Wayne Davison
2006-02-12 20:28           ` Peter Stephenson
2006-02-13 10:56             ` Peter Stephenson
2006-02-12  7:46       ` Andrey Borzenkov
2006-02-12  7:54         ` Andrey Borzenkov
2006-02-12 20:26       ` Peter Stephenson
2006-02-13 10:53         ` PATCH: fixing ${1+"$@"} when word-splitting Wayne Davison
2006-02-13 11:34           ` Peter Stephenson
2006-02-13 17:43             ` Wayne Davison
2006-02-13 18:08               ` Peter Stephenson
2006-02-13 19:00                 ` Wayne Davison
2006-02-13 19:33                   ` Wayne Davison
2006-02-13 19:33                   ` Peter Stephenson
2006-02-13 20:11                     ` Wayne Davison
2006-02-13 19:48               ` Wayne Davison
2006-02-13 11:40           ` DervishD
2006-02-14  7:14           ` Wayne Davison
2006-02-15 10:31             ` Wayne Davison
2006-02-15 11:35             ` Wayne Davison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060211120623.GB13513@DervishD \
    --to=zsh@dervishd.net \
    --cc=arvidjaar@newmail.ru \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).