zsh-autosuggestions
zsh-autosuggestions copied to clipboard
Autosuggestion triggered prematurely
Describe the bug
when selecting something from the autcomplete, subsequent suggestions are shown prematurely.
I attached a screenshot showing this behaviour when compared to fish
To Reproduce
Steps to reproduce the behavior:
- make a new directory
- add a file in there
example.txt
- in the shell , navigate to the new dieectory and type
less exam
- hit tab
note that file is completed, but then there's a second suggestion for example.txt
again.
In fish this doesnt, happen
Expected behavior
I expect that the suggestion I picked is chosen (but not executed) and there are no more suggestions until I start typing something more. similar to fish
shell. Right now it's shown even when I haven't typed anything more
Screenshots
Desktop
-
OS + distribution: Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal
-
Zsh version: 5.8
-
Plugin version: commit a411ef3e0992d4839f0732ebeb9823024afaaaa8
Additional context
Looks related to #656 and #658 actually. The behaviour is different with tab
in these scenarios. Ie the way tab works fish
is how right arrow works here.
i also get this when I type echo $HISTSIZE
. Note how it triggers a suggestion immediately, without having any space, making this impossible to use for history
think it's also related to this https://github.com/zsh-users/zsh-autosuggestions/issues/525, the suggestions is triggered on an empty buffer (ie whitespace )
if anyone is curious how to fix this:
https://github.com/zsh-users/zsh-autosuggestions/compare/master...Rhahkeem:whitespace?expand=1
shows the change I made
Got the same issue
Same issue