Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Fw: "VAR=foo export VAR" no longer works in zsh emulation
- X-seq: zsh-workers 40405
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Subject: Fw: "VAR=foo export VAR" no longer works in zsh emulation
- Date: Tue, 24 Jan 2017 13:50:37 +0000
- Cms-type: 201P
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <CGME20170124135040eucas1p11db129a17c1993a5b2d428ef9401bbf9@eucas1p1.samsung.com>
Begin forwarded message:
Date: Tue, 24 Jan 2017 13:24:28 +0000
From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
Subject: "VAR=foo export VAR" no longer works in zsh emulation
[repost]
looks like my email didn't make it to the zsh-workers ML
yesterday (sent Mon, 23 Jan 2017 15:30:23 +0000), so I'm
reposting it to you. Sorry for the dup if it ever makes its way
to the list.
VAR=foo export VAR
used to work in zsh the same way as in other Bourne-like shells.
That syntax the Bourne equivalent of Korn's:
export VAR=foo
(without the ambiguity of whether VAR=foo should be treated as
an assignment or a command argument).
It no longer works in zsh 5.3.1 ($VAR not modified). As in the
latest Debian unstable package for zsh.
$ VAR=123
$ VAR=abc export VAR
$ echo $VAR
123
$ emulate sh
$ VAR=abc export VAR
$ echo "$VAR"
abc
I found that out when some Bourne-compatible code sourced from
my .zshrc stopped working.
Is the change intentional?
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author