Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion oddities
- X-seq: zsh-workers 52402
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Completion oddities
- Date: Sun, 10 Dec 2023 14:56:51 -0800
- Archived-at: <https://zsh.org/workers/52402>
- In-reply-to: <CAH+w=7YZRQru3D6Cb6G6PMzVpkG9fbeOwbG_3CR-WD8mTU4Uqw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7YZRQru3D6Cb6G6PMzVpkG9fbeOwbG_3CR-WD8mTU4Uqw@mail.gmail.com>
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