zsh-workers
 help / color / mirror / code / Atom feed
From: Martijn Dekker <martijn@inlv.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: $* assignment regression in shwordsplit
Date: Sun, 2 Apr 2017 19:45:14 +0200	[thread overview]
Message-ID: <662d58a2-94fd-657c-e414-452f48ef47fc@inlv.org> (raw)

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

Thanks,

- M.

[*] as of commit eaeebeb8bb80cd7e2f5c703c7da31f44a1ab3182


             reply	other threads:[~2017-04-02 17:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-02 17:45 Martijn Dekker [this message]
2017-04-02 17:49 ` Martijn Dekker
2017-04-02 17:58 ` Daniel Shahaf
2017-04-02 20:15   ` Bart Schaefer

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=662d58a2-94fd-657c-e414-452f48ef47fc@inlv.org \
    --to=martijn@inlv.org \
    --cc=zsh-workers@zsh.org \
    /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).