zsh-users / zsh-autosuggestions

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

When I hit the right arrow to complete the suggestion .. characters in the beginning are deleted #608

Open mohanrajanna15 opened 3 years ago

mohanrajanna15 commented 3 years ago

When I use the default script few letters at the beginning of the suggestion gets deleted.

Steps to reproduce:

a) let say I had entered echo $SHELL

b) now with the suggestion I will see as soon as I press letter 'e' echo $SHELL

however, when I hit the right arrow for completion, the cursor will move on $SHELL, and the letter 'e' at the beginning is deleted and if I hit the right arrow again, I will lose another character and cursor will reach end. cho $SHELL ho $SHELL

I am using ZSH on MAC OS BIG sur latest version.

ericfreese commented 3 years ago

This sounds a little like #570 and #578. I would look into your prompt as a possible cause. See if you can reproduce with zsh -df and sourcing the plugin manually. If you can't reproduce in that environment, it's likely something your ~/.zshrc is causing the trouble. Try commenting out your whole ~/.zshrc and incrementally adding chunks back in to track down the cause of the problem.

wenbingzhang commented 2 years ago
image

recurrent zsh_history.zip

replace .zsh_history