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

Re: bad math expression error inside _pick_variant when running insert-all-matches for ls



> On 28 September 2020 at 18:02 Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:
> On Mon, Sep 28, 2020 at 6:51 PM Peter Stephenson
> <p.w.stephenson@xxxxxxxxxxxx> wrote:
> >
> > -elif (( $precommands[(I)builtin] )); then
> > +elif (( ${precommands[(I)builtin]:-0} )); then
> 
> Doesn't $precommands[(I)builtin] always expand to an integer (as long
> as precommands is an array)? In which case can it expand to null?

Yes, I would guess for some reason precommands isn't an array here.

That might mean the context isn't set up the way completion usually
expects it, of course, in which case this isn't the proper fix.

pws




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