zsh-workers
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@zsh.org
Subject: Re: [BUG] Tied parameters not restored correctly after pre-command re-assignment
Date: Fri, 8 Dec 2017 18:47:54 -0600	[thread overview]
Message-ID: <766AB717-4F48-48F0-8480-DB5E13DBD32F@dana.is> (raw)
In-Reply-To: <CAH+w=7a+b8uTROVFOM10pxDCUP0=znT28tkcjqyiaLwzCrRDRw@mail.gmail.com>

On 8 Dec 2017, at 18:23, Bart Schaefer <schaefer@brasslantern.com> wrote:
> Several things:  One, there's no implication that assigning to the
> array part of a tied variable will have any effect on the environment
> value of the scalar part unless you've explicitly exported the scalar.
>  Two, exporting arrays is unsupported / undefined behavior, so using
> an array assignment as a command prefix is only sensible in contexts
> where all the execution takes place within the current shell (except
> see also item one).

Yeah, i certainly wouldn't expect it to be able to export the array part.

As far as implying an effect on the environment, i don't know, it obviously
doesn't contradict the documentation or anything, but it seems intuitive (and
useful) to me that it would behave that way. But i realise that would be an
enhancement, not a bug.


      reply	other threads:[~2017-12-09  0:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08 22:51 dana
2017-12-09  0:23 ` Bart Schaefer
2017-12-09  0:47   ` dana [this message]

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=766AB717-4F48-48F0-8480-DB5E13DBD32F@dana.is \
    --to=dana@dana.is \
    --cc=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).