zsh-autocomplete: Menu items not showing with OMZ

When I try using the suggestions, they do not appear at the bottom of the prompt. I always have to use the down arrow to bring them up. They seem to flicker when I press the tab key (unless there is only one obvious choice). This used to work in Ubuntu 20.04 with the same Agnoster theme.

  • I have carefully read all of the instructions in this issue template.
  • I have carried them out to the letter.

Failure to do so can and will result in your issue being closed without warning.

Environment

print -l $_autocomplete__funcfiletrace
git -C ~zsh-autocomplete log --oneline -n1
$ print $VENDOR $OSTYPE $SHELL $ZSH_ARGZERO $ZSH_PATCHLEVEL
ubuntu linux-gnu /usr/bin/zsh /usr/bin/zsh ubuntu/5.8.1-1

$ print -l $_autocomplete__funcfiletrace
/home/avneesh/.zshrc:82

$ git -C ~zsh-autocomplete log --oneline -n1
aed8e17 (HEAD -> main, origin/main, origin/HEAD) Fix recent-dirs naming conflict
  • Operating system: Linux Mint 21 (Vanessa), downstream of Ubuntu 22.04 (Jammy) and Debian bookworm
  • Terminal emulator: Terminator (version 2.1.1), ZSH, Agnoster theme
  • I have filled out the fields above.
  • I have ran the commands in the code block above.
  • I have pasted their output into the same block.

Steps to reproduce

cd $(mktemp -d)
git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git
> .zshrc <<EOF
PS1='%# ' PS2= RPS2='%^'; setopt transientrprompt interactivecomments
source ~/zsh-autocomplete/zsh-autocomplete.plugin.zsh
EOF
env -i HOME=$PWD PATH=$PATH TERM=$TERM ${TERMINFO:+TERMINFO=$TERMINFO} zsh -d
  • I have run the code block above to create a test environment.
  • I have reproduced my problem in this environment in the most minimal way possible.
  • I have copy-pasted my entire test session into the same code block.

Somehow, in the above steps, the issue does not occur.

The problem is not getting options here image

In the above test session, they do come up image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 21 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks, but as I said, I already found a fix:

Modifying the change in 96bbb5b fixed your test case for me.

@marlonrichert , please push the fix 🙏

@MrAureliusR if you have installed manually try to revert to the commit mentioned: git checkout d8bfbef46efc54c1189010a3b70d501b44487504 => this requires to clone the repo without --depth 1 this fixed it for me if not you will have to wait for the fix someone correct me if i’m wrong

@marlonrichert You are correct, somehow i ended up making a shallow clone of the repository and 96bbb got cut out, i can confirm that the commit before 96bbb5b works correctly

d8bfbef4 is the last working commit for me, so 96bbb5bb broke it for me.

I’ve done a bit of testing and found that the problem only occurs with zsh-autocomplete + ohmyzsh + powerlevel10k

Here’s a test case:

  1. Setup Ubuntu 22.04 LTS (I did it in wsl)
  2. Install zsh, chose option 2 to populate .zshrc
  3. git clone https://github.com/marlonrichert/zsh-autocomplete to ~
  4. Install oh my zsh sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  5. add skip_global_compinit=1 to .zshenv
  6. append the following to .zshrc
setopt autocd extendedglob nomatch notify
zstyle :compinstall filename '$HOME/.zshrc'
source ~/zsh-autocomplete/zsh-autocomplete.plugin.zsh
  1. Install powerline 10k: git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
  2. Start a new zsh instance to go through powerline 10k’s configuration wizard. Always pick the first option
  3. Set `ZSH_THEME=“powerlevel10k/powerlevel10k” in .zshrc (not needed)
  4. cd ~
  5. Press tab

Getting the same issue in Ubuntu 18.04, manual installation, default settings.

My other computer is on 5b0073d and working, so I checked it out manually and the problem is no more.

Probably a recent commit somewhere.