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

Re: Hiding specials, and namerefs



On Sun, Jul 19, 2026 at 5:40 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> On Mon, Jul 20, 2026 at 1:54 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > Should there be an error or warning when attempting to "de-specialize"
> > a special parameter in the same scope where it already exists as a
> > special?
>
> I think that would make sense, I vaguely remember being confused why
> typeset -h seemingly didn't work

Fooling with this, I find one Test/* case that raises questions:

B02typeset.ztst
(eval):typeset:3: SRANDOM: can't change type of autoloaded parameter
Was testing: Global -h variable doesn't hide autoload variable

Why does it ever make sense to apply -h to a global?  What's the point
of this test?

I think this one exemplifies the change, the use of -h shouldn't be a
silent no-op.  Thoughts?




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