Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: $* assignment regression in shwordsplit



Martijn Dekker wrote on Sun, Apr 02, 2017 at 19:45:14 +0200:
> In the current zsh development version[*], there is a regression with
> assigning "$*" to a variable in shwordsplit mode when IFS is either
> unset or empty. The "$*" is only expanded the first time it occurs.
> 
> $ Src/zsh -f -c 'set -- one two; unset IFS; var=$*/$*; echo $var $*/$*;
> 	setopt shwordsplit; var=$*/$*; echo "$var" "$*/$*"'
> one two/one two one two/one two
> one two/$* one two/one two
> 
> $ Src/zsh -f -c 'set -- one two; IFS=; var=$*/$*; echo $var $*/$*;
> 	setopt shwordsplit; var=$*/$*; echo "$var" "$*/$*"'
> onetwo/onetwo onetwo/onetwo
> onetwo/$* onetwo/onetwo

Both of these bisect to:

commit 74fe4d0950d5db0bba9d8ec182c4a827728cff60
Author: Barton E. Schaefer <schaefer@xxxxxxx>
Date:   Mon Feb 20 13:22:55 2017 -0800

    40598: paramsubst() should always return scalar when PREFORK_SINGLE was passed

:100644 100644 0d3352a8e807172c7adcde89a7a769c1c704320c 60a5164d638eba63dcef57a7e7bbf7951ada4426 M      ChangeLog
:040000 040000 843e4c1065cbcdb63fb554ab97de69741351f78c e3d9d89d533c0cd63a7aaa0d714e232e024302ca M      Src




Messages sorted by: Reverse Date, Date, Thread, Author