zsh-autosuggestions icon indicating copy to clipboard operation
zsh-autosuggestions copied to clipboard

It just can worked in one window

Open thiswhy opened this issue 7 years ago • 5 comments

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

thiswhy avatar Sep 28 '18 05:09 thiswhy

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)

ericfreese avatar Oct 23 '18 14:10 ericfreese

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

hotpxl avatar Feb 13 '19 16:02 hotpxl

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 :)

zezhishao avatar Feb 28 '19 14:02 zezhishao

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

hotpxl avatar Mar 04 '19 02:03 hotpxl

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. Screenshot from 2020-12-08 22-45-58

younnggsuk avatar Dec 08 '20 14:12 younnggsuk