bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Word splitting with zsh fix


From: Roumen Petrov
Subject: Re: Word splitting with zsh fix
Date: Sun, 12 Feb 2006 17:05:14 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920

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
<address@hidden>. The patch was suggested by Andrey Borzenkov
<address@hidden>.

    Thanks in advance and happy hacking :)

    Raúl Núñez de Arenas Coronado



------------------------------------------------------------------------

_______________________________________________
Bug-libtool mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-libtool






reply via email to

[Prev in Thread] Current Thread [Next in Thread]