Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Strange behavior of $jobstates
- X-seq: zsh-users 23759
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-users@xxxxxxx>
- Subject: Re: Strange behavior of $jobstates
- Date: Wed, 14 Nov 2018 09:27:15 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20181114092717euoutp0241f173eb96ad452ee7f09fb06365e1cb~m83xZgVF02857528575euoutp02F
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1542187637; bh=gO0sLVpeg91AFU0f1vo36yaTSUGRiGTbBSBcnFStGZ8=; h=Subject:From:To:Date:In-Reply-To:References:From; b=S45cmTo3UD8BjiqfhtnrVQ9Qv80fswuXwc/Eu971KIBiw/mZnbEzT1D1GP0CaSG0C TfD0FmWwfS2FOr3rUDqWuSKZnbXFsCLhE3/DLf2Gnjjoe8jPnSM8ox+DepUNdDr4ia 48fU4s90baukzzGTsrEQJZ6snkxaajaeL9QVodeo=
- In-reply-to: <CAN1e-MSFGN5OXx68C1wjHhYycm33Vc0Z5m=mh6GiPvZbVXr9fA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAN1e-MQb87kK9yhAo6vaaWD-2gXd0qk=9xzJQi=soW6QyH_c0Q@mail.gmail.com> <B00ED18E-7E30-4B13-BE7B-4C60C3657C0A@dana.is> <CGME20181114014514epcas2p3a1626811808e4dc0828a1f1970a1c1ef@epcas2p3.samsung.com> <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author