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

Zsh-autocomplete not working once I close terminal or start a new session

Open rahulr8 opened this issue 3 years ago • 9 comments

Describe the bug

Zsh-autocomplete works great for me in any given zsh session. But as soon as I open a new session (new terminal tab or restart terminal), none of my previous commands are available for me to auto-complete.

Machine - Mac M1

I installed using: git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions and in my .zshrc I have:

plugins=(zsh-autosuggestions)

source $ZSH/oh-my-zsh.sh

I've looked for the fix everywhere but noone seems to be having similar issues.

rahulr8 avatar Oct 08 '21 00:10 rahulr8

Have you seen the comments on #416?

ericfreese avatar Oct 08 '21 12:10 ericfreese

Same problem here. I'm not using oh-my-zsh though, just source zsh-autosuggestions/zsh-autosuggestions.zsh in ~/.zshrc.

AlanDecode avatar Jan 13 '23 09:01 AlanDecode

You need to add these two zsh file to your ~/.zshrc

source /PATH/TO/zsh-autosuggestions/zsh-autosuggestions.zsh source /PATH/TO/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

lhuangufl avatar Jun 12 '23 19:06 lhuangufl

Same problem here. I'm not using oh-my-zsh though, just source zsh-autosuggestions/zsh-autosuggestions.zsh in ~/.zshrc.

For me, it is because the history file not set properly for zsh commands. Problem solved.

AlanDecode avatar Jun 13 '23 00:06 AlanDecode

same problem here

mengxi-ream avatar Sep 18 '23 00:09 mengxi-ream

same problem here

nvm, I didn't add source zsh-autosuggestions/zsh-autosuggestions.zsh in end of ~/.zshrc file

mengxi-ream avatar Sep 18 '23 00:09 mengxi-ream