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

Re: A way to untie -T vars?



On 1/23/23, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> On 1/23/23, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>> On Mon, Jan 23, 2023 at 1:47 AM Roman Perepelitsa
>> <roman.perepelitsa@xxxxxxxxx> wrote:
>>>
>>> Here foo is array-local-tag-tied-unique-hide-hideval. I believe it can
>>> be untied and become array-local-tag-unique-hide-hideval (only "tied"
>>> is gone).
>>
>> Hm.
>>
>> Another interesting note, "typeset -x" implies "-g" but "local -x" does
>> not.
>
> There's no way it could imply it, since local -g doesn't accept -g, so
> you would have to argue why typeset -x should not imply it (and do it
> like 30 years ago) :).
>
> Checked the manpage and it says export is equivalent to typeset -gx,
> which is true, but we could save a byte by removing that g.

Noticed just after sending, but technically not true, typeset -gx +gx
is allowed, whereas export +x as noted previously is not.

-- 
Mikael Magnusson




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