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

Re: crash with nameref and local argv



Bart Schaefer wrote:
> On Mon, Nov 3, 2025 at 8:53 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > > On Tue, Jun 10, 2025 at 1:11 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> > > >
> > > > % () { local argv=( $argv ); typeset -nu foo=argv; echo $foo }
> >
> > You can't make a named reference to the parent's argv
> > array, because that doesn't exist "below" its original scope
>
> Brute-force way to fix this follows.  If we run into more special
> cases it might be worth passing flags to valid_refname().

Still crashes with typeset -nu 'foo=argv[1]'

Oliver




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