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

Re: Completion oddities



On Sun, Dec 10, 2023 at 9:27 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> #1
> It appears that setting MENUSELECT globally, overrides the "no-select"
> string in the "menu" zstyle.

It's a problem with mixing no-select and yes=NUM:

  zstyle ':completion:*' menu no-select yes=2

Having yes=2 means arriving at _main_complete line 301 with
compstate[insert]=unambiguous from line 293 so we never take the
branch that would unset MENUSELECT.

> #2
> When the "original" style is true for _approximate and _correct, the
> REC_EXACT option seems to be ignored.  Is there a way around that?

This seems to do it:

  zstyle -e ':completion:*:(approximate|correct)*:*' original \
    'if [[ $compstate[nmatches] -eq 1 && -o recexact ]]; \
     then reply=(false); else reply=(true); fi'

#3 and #4 are sort of rehetorical.




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