-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Description
Describe the bug
When an autosuggestion for a path is showing, and a trailing slash is suggested by zsh, using the "right" bind in vim to accept the autosuggestion from the plugin, removes the slash suggested by zsh. This does not happen when the "right" arrow key is used.
To Reproduce
Steps to reproduce the behavior:
- Enable vim mode in
.zshrc
. For reference, I am pasting my wholeplugins
variable from my.zshrc
(from OhMyZsh):
plugins=(git vi-mode fzf zsh-autosuggestions)
- Ensure that you have
completion
as an autosuggestion strategy:
ZSH_AUTOSUGGEST_STRATEGY=(completion)
- Create the following file structure:
$ tree
.
└── hello
└── world
2 directories, 1 file
- In insert mode, type
file he<tab>
. Now, the command line should show:
$ file hello/[world]
where [world]
is an autosuggestion from the plugin.
- Press
<esc>
to enter normal mode, and then pressl
to accept the plugin. The command now goes to:
$ file helloworld
Expected behavior
The completion should include the slash at the end:
$ file hello/world
Screenshots
Autosuggestion for file hello/[world]
:
Autocompletion to file helloworld
after accepting:
Desktop
- OS + distribution: Arch Linux 6.14.9-arch1-1
- Zsh version: 5.9
- Plugin version: commit hash
0e810e5afa27acbd074398eefbe28d13005dbc15
Additional context
This appears to be caused because the ending slash after hello
is suggested by zsh
, which gets deleted when zsh-autosuggest
completes the suggestion.