Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: crash with nameref and local argv
- X-seq: zsh-workers 54028
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Mikael Magnusson <mikachu@xxxxxxxxx>, zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: crash with nameref and local argv
- Date: Tue, 04 Nov 2025 21:54:46 +0100
- Archived-at: <https://zsh.org/workers/54028>
- In-reply-to: <CAH+w=7YWh4nS__qzBEb3i9_OYfTkYfqLYSigEp+Obyp6_K+nDg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHYJk3Qe7XuGv_B8nFUdHLD4C_kSgaJkS5acAFWTJ2Db_GWoUQ@mail.gmail.com> <CAHYJk3RW-a5_sG4sc4pN-X3=Q1AQ2rZbBsKidWXEBzJps8piZw@mail.gmail.com> <CAH+w=7YuE2GzH1F9r9Q6WmJxk1puj1M1qmSLsQ76pJ2r+49r4g@mail.gmail.com> <CAH+w=7YWh4nS__qzBEb3i9_OYfTkYfqLYSigEp+Obyp6_K+nDg@mail.gmail.com>
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