Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [BUG] Tied parameters not restored correctly after pre-command re-assignment



On 8 Dec 2017, at 18:23, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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.



Messages sorted by: Reverse Date, Date, Thread, Author