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



I'm sorry I thought it came with zsh, but it turned out that I got it from a zsh-users message. The code is 

_insert_all_matches () {
    setopt localoptions nullglob rcexpandparam extendedglob noshglob
    unsetopt markdirs globsubst shwordsplit nounset ksharrays
    compstate[insert]=all
    compstate[old_list]=keep
    _complete
}
zle -C insert-all-matches complete-word _insert_all_matches

This code has worked for me for a few years until today I noticed that it didn't work well with ls.

Mikael Magnusson <mikachu@xxxxxxxxx> 于 2020年9月29日周二 00:30写道:
On 9/28/20, lilydjwg <lilydjwg@xxxxxxxxx> wrote:
> bindkey '^Xi' insert-all-matches
>
> And then type:
>
> ls ^Xi
>
> There is an error message:
>
> _pick_variant:19: bad math _expression_: operand expected at `|| 0 ) '
>
> I'm using zsh 5.8 on Arch Linux.

You should either complain to the person who wrote insert-all-matches,
or provide the code here, otherwise nobody has any chance to guess
what's wrong.

--
Mikael Magnusson


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