wting / autojump

A cd command that learns - easily navigate directories from the command line
Other
16.06k stars 702 forks source link

Please source the correct autojump file in your shell's startup file. #690

Closed dep closed 3 months ago

dep commented 3 months ago

I didn't see anything in the readme about this. I installed via Homebrew, but running autojump gives me:

Please source the correct autojump file in your shell's
startup file. For more information, please reinstall autojump
and read the post installation instructions.
dep commented 3 months ago

If you are like me and struggle with reading what your cli literally tells you to do post-install, then this is what you missed:

Add the following line to your ~/.bash_profile or ~/.zshrc file:
  [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh

If you use the Fish shell then add the following line to your ~/.config/fish/config.fish:
  [ -f /usr/local/share/autojump/autojump.fish ]; and source /usr/local/share/autojump/autojump.fish

Restart your terminal for the settings to take effect.

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
dep commented 3 months ago

I did receive this though upon updating my .zshrc and refreshing my session:

/usr/local/share/autojump/autojump.zsh:49: defining function based on alias `j'
/usr/local/share/autojump/autojump.zsh:49: parse error near `()'
/usr/local/Cellar/autojump/22.5.3_3/share/autojump/autojump.zsh:49: defining function based on alias `j'
/usr/local/Cellar/autojump/22.5.3_3/share/autojump/autojump.zsh:49: parse error near `()'