zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: Re: "VAR=foo export VAR" no longer works in zsh emulation
Date: Tue, 24 Jan 2017 14:24:17 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.00.1701241419040.4560@toltec.zanshin.com> (raw)
In-Reply-To: <20170124175258.78b0554e@pwslap01u.europe.root.pri>

On Tue, 24 Jan 2017, Peter Stephenson wrote:

> It looks up to 5.2 you don't need the option, and this changed in the
> commit below.
>
> So it's less sh compatibility, as it still works there, and more
> backward compatilibity in zsh.
>
> pws
>
> commit c8de0af35935602370cc79193d0e0d53971250d4
> Author: Barton E. Schaefer <schaefer@zsh.org>
> Date:   Mon Sep 19 00:25:13 2016 -0700
>
>     39381: handle save/restore of variable values when "typeset"-related reserved words are prefixed by an assignment


Hrm, this is a bit ugly.

It might be possible to fix this for "export" by a special-case on the
command name, but it's going to be nearly impossible to make "typeset -x"
behave equivalently, because the save/restore is generic in exec.c where
we barely know what command we're about to run, and we don't learn that
we're exporting until the depths of bin_typeset(), nor propagate that
back out in any way.


  reply	other threads:[~2017-01-24 22:24 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 ` Fw: " Peter Stephenson
     [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 [this message]
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=alpine.LRH.2.00.1701241419040.4560@toltec.zanshin.com \
    --to=schaefer@brasslantern.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).