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

Re: A way to untie -T vars?



On Tue, Jan 24, 2023 at 11:54 PM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Jan 24, 2023 at 1:56 AM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > On Tue, Jan 24, 2023 at 6:45 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > >
> > > I've reached the conclusion that "local" makes no difference here.
> >
> > I actually knew that! There is no way to remove a parameter from a
> > scope. Once a name is added to a scope, it stays there forever
>
> Turns out that such a name also retains its justification settings
> when unset

That sounds surprising. Is this actually so?

    % () {
      typeset -L3 foo
      typeset -p foo
      unset foo
      typeset foo
      typeset -p foo
    }

    typeset -L3 foo=''
    typeset foo=''

Here unset + typeset removed justification, as I would expect. Am I
misunderstanding what you meant?

Roman.




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