From: Peter Stephenson <p.stephenson@samsung.com>
To: <zsh-users@zsh.org>
Subject: Re: Strange behavior of $jobstates
Date: Wed, 14 Nov 2018 09:27:15 +0000 [thread overview]
Message-ID: <1542187635.3686.1.camel@samsung.com> (raw)
In-Reply-To: <CAN1e-MSFGN5OXx68C1wjHhYycm33Vc0Z5m=mh6GiPvZbVXr9fA@mail.gmail.com>
On Wed, 2018-11-14 at 10:43 +0900, Manabu Matsui wrote:
> As a result of this change, the operation of the parameter expansion
> having a side effect also has changed. Is this intended?
>
> Before this change (zsh 5.4.2 (x86_64-ubuntu-linux-gnu)):
> % a=1
> % echo ${a::=2}|cat
> 2
> % echo $a
> 2
>
> After this change (zsh 5.6.2 (x86_64-apple-darwin18.0.0)):
> % a=1
> % echo ${a::=2}|cat
> 2
> % echo $a
> 1
Yes, the change is correct. Setting a parameter in the left hand side
of the pipeline shouild not affect anything outside the pipeline.
Although the standard doesn't specify which side of the pipeline is run
in a forked copy, in zsh it's always the left hand side, so the fact
that effects were escaping from there was a bug.
pws
next prev parent reply other threads:[~2018-11-14 9:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 4:46 Manabu Matsui
2018-11-13 7:53 ` dana
2018-11-14 1:43 ` Manabu Matsui
2018-11-14 9:27 ` Peter Stephenson [this message]
2018-11-15 0:45 ` Manabu Matsui
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=1542187635.3686.1.camel@samsung.com \
--to=p.stephenson@samsung.com \
--cc=zsh-users@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).