zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Fw: "VAR=foo export VAR" no longer works in zsh emulation
Date: Tue, 24 Jan 2017 13:50:37 +0000	[thread overview]
Message-ID: <20170124135037.06081eb1@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CGME20170124135040eucas1p11db129a17c1993a5b2d428ef9401bbf9@eucas1p1.samsung.com>

Begin forwarded message:

Date: Tue, 24 Jan 2017 13:24:28 +0000
From: Stephane Chazelas <stephane.chazelas@gmail.com>
To: Peter Stephenson <p.stephenson@samsung.com>
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


       reply	other threads:[~2017-01-24 14:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170124135040eucas1p11db129a17c1993a5b2d428ef9401bbf9@eucas1p1.samsung.com>
2017-01-24 13:50 ` Peter Stephenson [this message]
     [not found]   ` <CGME20170124163239eucas1p1a2fc806430fa49f6e0c9ec83fe42b676@eucas1p1.samsung.com>
2017-01-24 16:32     ` Peter Stephenson
2017-01-24 16:34       ` Bart Schaefer
2017-01-24 16:42         ` Bart Schaefer
2017-01-24 17:52           ` Peter Stephenson
2017-01-24 22:24             ` Bart Schaefer
2017-01-24 16:44         ` Peter Stephenson

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=20170124135037.06081eb1@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --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).