Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A way to untie -T vars?
- X-seq: zsh-users 28693
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Cc: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: A way to untie -T vars?
- Date: Sat, 21 Jan 2023 09:23:39 -0800
- Archived-at: <https://zsh.org/users/28693>
- In-reply-to: <CAN=4vMobvC36xyjGdz42zyktw2MOsb3KE-y9YWADLhgiXw5duw@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAKc7PVDEmKnY9TiYwaAgvzXEqNhLwZo46paUPjJOz9HsU3_djg@mail.gmail.com> <CAH+w=7YY5F_ZYJgivw9PSjt8PTQ9R+gHF3jnjbBw-LLkEnc2zg@mail.gmail.com> <CAN=4vMobvC36xyjGdz42zyktw2MOsb3KE-y9YWADLhgiXw5duw@mail.gmail.com>
On Sat, Jan 21, 2023 at 9:15 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> unset2() {
> local _"$1"
> typeset -gT _"$1" "$1"
> }
Hm, yes, it's a bit weird to tie two variables that are in different
scopes. This is vaguely related to the fix I applied to zsh/gdbm a
few months back to prevent local ztie from messing with the scope of a
database handle.
It ought to be possible to check for this and make that "typeset -gT"
into an error, if that's what we want to do.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author