zsh-workers
 help / color / mirror / code / Atom feed
From: Roumen Petrov <bugtrack@roumenpetrov.info>
To: DervishD <zsh@dervishd.net>
Cc: bug-libtool@gnu.org, Zsh Workers <zsh-workers@sunsite.dk>
Subject: Re: Word splitting with zsh fix
Date: Sun, 12 Feb 2006 17:05:14 +0200	[thread overview]
Message-ID: <43EF4EAA.6040507@roumenpetrov.info> (raw)
In-Reply-To: <20060211122226.GD13513@DervishD>

Hi Raúl,

I would like to know if option SH_WORD_SPLIT is set problem is solved too ?

Test case:
===============================
#!/bin/zsh

VAR="v1 v2"

for V in ${VAR}; do
  echo V1=$V
done

setopt SH_WORD_SPLIT
for V in ${VAR}; do
  echo V2=$V
done
===============================
When SH_WORD_SPLIT is set zsh work as bash, ksh, ash etc.


DervishD wrote:
>     Hi all :)
> 
>     I've spotted a problem with libtool that has to do with the word
> splitting that Zsh does in the expression '${1+"$@"}' (which, in
> turn, is a workaround to fix the "$@" expansion problem when the
> variable is empty in old shells). GNU autoconf has already corrected
> this problem, and I'm using a similar fix for libtool. The patch is
> gzipped and attached to this message.
> 
>     Looking at the SUS (POSIX) standard, I'm not sure if field
> splitting should be performed in the above expression or not, so I
> don't know if the correct behaviour is what Bash does or what Zsh
> does. Anyway, I'm not here looking for a culprit but for a solution.
> I will be glad to discuss the issue, anyway, just for curiosity's
> sake ;)
> 
>     I've tested the patch against "littlecms" sources, because that's
> the package where the problem was spotted by David Gómez Espinosa
> <david@pleyades.net>. The patch was suggested by Andrey Borzenkov
> <arvidjaar@newmail.ru>.
> 
>     Thanks in advance and happy hacking :)
> 
>     Raúl Núñez de Arenas Coronado
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Bug-libtool mailing list
> Bug-libtool@gnu.org
> http://lists.gnu.org/mailman/listinfo/bug-libtool



  parent reply	other threads:[~2006-02-12 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-11 12:22 DervishD
2006-02-12  8:56 ` Ralf Wildenhues
2006-02-12 10:33   ` DervishD
2006-02-13 16:52     ` Ralf Wildenhues
2006-02-12 15:05 ` Roumen Petrov [this message]
2006-02-12 16:57   ` Andrey Borzenkov
2006-02-12 21:52     ` Roumen Petrov
2006-02-12 18:45   ` Wayne Davison
2006-02-12 21:52     ` Roumen Petrov
2006-02-13  8:46       ` Wayne Davison
2006-02-13 11:37   ` DervishD

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=43EF4EAA.6040507@roumenpetrov.info \
    --to=bugtrack@roumenpetrov.info \
    --cc=bug-libtool@gnu.org \
    --cc=zsh-workers@sunsite.dk \
    --cc=zsh@dervishd.net \
    /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).