Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Parameter flags and subscripts and references
- X-seq: zsh-workers 54087
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Philippe Altherr <philippe.altherr@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Parameter flags and subscripts and references
- Date: Mon, 17 Nov 2025 03:55:54 +0100
- Archived-at: <https://zsh.org/workers/54087>
- In-reply-to: <CAH+w=7Z2uwZDovnJzKh1pRfSPSuu5+F-8H+GXmazBe2up4ownQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7Y5EVK3NE0EsR3WkbDvgGVSHc_FFpscvmSuZ3=T-dq_2A@mail.gmail.com> <CAGdYchusmSr2wwRJDLsPGzj56SaNS2m5U1Tf5_HwYj9qa0=jEg@mail.gmail.com> <CAH+w=7Z2uwZDovnJzKh1pRfSPSuu5+F-8H+GXmazBe2up4ownQ@mail.gmail.com>
On 13 Nov, Bart Schaefer wrote:
> Maybe the answer is that ${parameters[foo]} should *never* expand to
> "nameref-scalar" and should just stop at "nameref" like (t!) does,
> regardless of what "foo" represents.
Keep in mind that $parameters was created specifically to support
completion and to provide a way to get a list of parameters that are
applicable to a particular context. Mostly you shouldn't need to care
whether something is a nameref to a whatever or just a plain whatever.
I don't particularly object to the value including "nameref" but the
rest of the type is needed.
Extracting existing uses of _parameters -g we have:
^a*
a*
*array*
array
*array*~*readonly*
*assoc*
*association*~*readonly*
*export*
*export*~*readonly*
(integer|float)*
^*readonly*
^*(readonly|association)*
*scalar*
scalar*export*
A few of those probably need an initial *.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author