zsh-users / zsh-autosuggestions

Fish-like autosuggestions for zsh
MIT License
30.95k stars 1.86k forks source link

Having to source every time #550

Closed dipam7 closed 4 years ago

dipam7 commented 4 years ago

I am using a Mac with Catalina version 10.15.5. I tried installing autosuggestions using homebrew and although it installed properly it did not work. I then did the manual approach of cloning and sourcing and it worked. However, when I closed the terminal it didn't work. I had to source it again for it to work next time. What do I do so that I don't have to enable it every time?

nwwdles commented 4 years ago

you have to add the source command to .zshrc, not source it manually. commands from .zshrc run every time you open the shell. (when you're making changes, you can reload it by doing exec zsh instead of opening a new terminal).

alternatively, you can use a package manager (e.g. zinit), it'll take care of downloading and sourcing files for you (but you still have to edit zshrc to setup the package manager).

ericfreese commented 4 years ago

See this note that should have displayed after installing via homebrew https://github.com/Homebrew/homebrew-core/blob/master/Formula/zsh-autosuggestions.rb#L15-L21

alanyong91 commented 3 years ago

Same thing happen to me. I followed second method and need to source everytime

https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh

FYI, I using MacOS Big Sur