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 whole plugins 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:
where [world] is an autosuggestion from the plugin.
- Press
<esc> to enter normal mode, and then press l to accept the plugin. The command now goes to:
Expected behavior
The completion should include the slash at the end:
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.
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:
.zshrc. For reference, I am pasting my wholepluginsvariable from my.zshrc(from OhMyZsh):completionas an autosuggestion strategy:file he<tab>. Now, the command line should show:where
[world]is an autosuggestion from the plugin.<esc>to enter normal mode, and then presslto accept the plugin. The command now goes to:Expected behavior
The completion should include the slash at the end:
Screenshots
Autosuggestion for

file hello/[world]:Autocompletion to

file helloworldafter accepting:Desktop
0e810e5afa27acbd074398eefbe28d13005dbc15Additional context
This appears to be caused because the ending slash after
hellois suggested byzsh, which gets deleted whenzsh-autosuggestcompletes the suggestion.