zsh-autosuggestions
zsh-autosuggestions copied to clipboard
It just can worked in one window
exp : I open one window ,input 'source', then enter ,and then input 's', it's worked .But i open another window ,I input 's',It's not working.I'm so sadness
I looked into this a little bit found some complex behavior. As a workaround for now, enabling async mode may help. And you can also look at some of the zsh options related to history (section 16.2.4 here: http://zsh.sourceforge.net/Doc/Release/Options.html)
Does this have to do with ZLE set-local-history?
I have SHARE_HISTORY turned on, so my Ctrl + R search could find history from other open sessions, but it's not the case with autosuggestion
Are you a mac? The method in INSTALL.MD for mac will occur this situation.
You can try this:
Clone it into ~/.zsh/zsh-autosuggestions
Add codes blow into ~/.zshrc
# Load zsh-autosuggestions.
source ~/.zsh/zsh-autosuggestions/autosuggestions.zsh
# Enable autosuggestions automatically.
zle-line-init() {
zle autosuggest-start
}
zle -N zle-line-init
Then
Source ~/.zshrc
That works for me :)
fwiw, I found a bug in Zsh related to this http://www.zsh.org/mla/workers/2019/msg00105.html You may not have the exact same issue though
I had the same problem and I solved it by changing the owner of the ~/.zsh_history file.
The moment I closed the terminal, I noticed some error passing by. After checking, I realized that it was because the ~/.zsh_history file was owned by root, and I was able to fix it after changing to user with the chown command.
