marlonrichert / zsh-autocomplete

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
MIT License
5.26k stars 145 forks source link

Bug: `bindkey '^I' menu-select` not working with latest release #749

Open chrisgrieser opened 3 weeks ago

chrisgrieser commented 3 weeks ago

The problem

I use bindkey '^I' menu-select as recommended in the readme to have tab open up the menu selection.

However, since updating to the 2024-09-04 release, this functionality appears to be broken. Using tab in the cmdline does not work anymore to open up the completion menu. As a test case, I tried bindkey '^E' menu-select, after which ctrl-e works correctly in showing the completion menu.

This is most noticable when using setopt AUTO_CD, which suggests local directories on tab in an empty cmdline.

Environment

% typeset -p1 VENDOR OSTYPE ZSH_PATCHLEVEL _autocomplete__funcfiletrace
typeset VENDOR=apple
typeset OSTYPE=darwin23.0
typeset ZSH_PATCHLEVEL=zsh-5.9-0-g73d3173
typeset -a _autocomplete__funcfiletrace=(
  /opt/homebrew/share/zsh-autocomplete/zsh-autocomplete.plugin.zsh:4
  /Users/chrisgrieser/.config/zsh/config/zsh_plugins.zsh:11
  /Users/chrisgrieser/.config/zsh/.zshrc:25
  zsh:0
)
% git -C ~autocomplete log --oneline -n1
1f9bd2de89 (HEAD -> stable, tag: 4.3.19) Merge pull request #18224 from Homebrew/revert-18188-better-shellenv

Steps to reproduce

% cd $(mktemp -d)
% git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git
<output>
% > .zshrc <<EOF
setopt interactivecomments transientrprompt
PS1='%# '
PS2=
RPS2='%^'
source $PWD/zsh-autocomplete/zsh-autocomplete.plugin.zsh
EOF
% env -i HOME=$PWD PATH=$PATH TERM=$TERM ${TERMINFO:+TERMINFO=$TERMINFO} zsh -d
% cd "$HOME"
% setopt AUTO_CD
% bindkey '^I' menu-select
% ((press tab in empty cmdline)) → inserts literal tab.
% bindkey '^E' menu-select
% ((press ctrl-e in empty cmdline)) → correctly opens up completion menu with a list of directores in $HOME

I also tried bindkey '\t' menu-select, but that did not change the outcome. I am not attaching any log, since the log is empty.