zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.43k stars 1.85k forks source link

Getting wrong autosuggestion after selecting from completion menu #649

Open mortezadadgar opened 2 years ago

mortezadadgar commented 2 years ago

To Reproduce

Steps to reproduce the behavior:

  1. execute a command to save this in zsh history, in this case git submodule add https://github.com/zsh-users/zsh-syntax-highlighting
  2. type `git sub
  3. press TAB and press space now submodule is selected
  4. getting this git submodule module add https://github.com/zsh-users/zsh-syntax-highlighting that should not include module as part of autosuggestion

Expected behavior

add https://github.com/zsh-users/zsh-syntax-highlighting as suggestion

Zshrc

zstyle ':completion:*:default' menu yes select
autoload -U compinit; compinit
source path/to/zsh-autosuggestions

Screenshots

image image

Desktop

Additional context

I can not reproduce this if I press Enter to select from completion menu

chunleng commented 2 years ago

I have completion menu on and get the same problem. However, in my case, it only happen on the first command, subsequent command seems to work well