zsh-autocomplete: Autocompletion shows "do you wish to see all X possibilities", causing keystrokes to be eaten

Environment

print $VENDOR $OSTYPE $SHELL $ZSH_ARGZERO $ZSH_PATCHLEVEL
print -l $_autocomplete__funcfiletrace
git -C ~zsh-autocomplete log --oneline -n1
apple darwin20.0 /bin/zsh /bin/zsh zsh-5.8-0-g77d203f
~/.local/share/zinit/zinit.git/zinit.zsh:1622
~/.local/share/zinit/zinit.git/zinit.zsh:1261
~/.local/share/zinit/zinit.git/zinit.zsh:2676

Steps to reproduce

  1. Type pgrep (notice the space after pgrep).
  2. Noticed that the terminal shows up zsh: do you wish to see all 73 possibilities (75 lines)?, which consumes the next char I pressed.
  3. When I noticed that the first char is consumed, I pressed the backspace to delete all chars to the right of pgrep.
  4. The prompt zsh: do you wish to see all 73 possibilities (75 lines)? shows up again

Expected

If the terminal can hold all hints/expanded items/possibilities/etc., show them. Otherwise, show as many as possible. Please do not prompt zsh: do you wish to see all 73 possibilities (75 lines)?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 32 (11 by maintainers)

Most upvoted comments

@Altair-Bueno @RyanzpLee @Omoeba @jerryc05 I’m unable to reproduce the test cases given in this issue anymore. I think d6a0ff574679280af52258ee6d2dcd3857283270 might have fixed the bug. Can someone confirm?

@Omoeba Sorry, I’m still unable to reproduce it. Should you find a way to create a reliable test case for it, then please open a new issue for it.

After exhaustive testing, I’m still unable to create a test case that can reliably reproduce the issue. I’ll wait until someone can manage to reproduce it. Thanks for your assistance!

@Altair-Bueno @RyanzpLee @Omoeba @jerryc05 I’m unable to reproduce the test cases given in this issue anymore. I think d6a0ff5 might have fixed the bug. Can someone confirm?

It’s working great for me!! I can reduce the terminal size to an absurd size with no problems

image

Environment

zsh: zsh 5.8 (x86_64-apple-darwin21.0)
terminal: iTerm2 3.4.15
.zshrc: |
	zstyle ':completion:*:*:man:*:*' menu select=long search

Another easy solution is disabling that specific completion that is troublesome.

That actually is a good idea. I could implement a zstyle mechanism in Zsh Autocomplete with which you can disabled autocompletion for specific commands.

zstyle ':completion:*:*:man:*:*' menu select=long searchfixes the man issue for me

It doesn’t remove the message forever tho, but works better than my solution

The challenge for Zsh Autocomplete is to figure out how many completions will fit on screen before they are passed to Zsh’s compadd, because once added, they cannot be removed

I’m not familiar with zsh enough to work on this, but I’ll give it a try

You can disable do you wish.. by adding this to your .zshrc config file

zstyle ':completion:*' list-prompt   ''
zstyle ':completion:*' select-prompt ''

At Top: Hit TAB for more, or the character to insert

The one i find more disturbing is At Top: Hit TAB for more, or the character to insert. It only appears when the terminal is small enough (or when there are a lots of options to choose from). It’s the same behaviour: the terminal just keeps eating your characters and the only way im able to reset is to ^C and write the command anywhere else

zsh on iTerm2

Does anyone know how to disable it? Google doesn’t yield any good results.

Steps to reproduce

  1. Reduce terminal size to somewhere around 50x10
  2. type git -
  3. Notice how zsh autocomplete just keeps eating your characters