Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

j, jco, jc or jo don't exist after installing autojump on Mac OSX Yosemite

I installed autojump on my Mac OSX Yosemite with brew with

brew install autojump 

Now, I can't use it because when I try to use it:

jc asfg
-bash: jc: command not found

jo asfg
-bash: jo: command not found

j asdj
-bash: j: command not found

none of them exist. Any suggestions about what I'm doing wrong?

Thanks

like image 964
VaTo Avatar asked Jul 15 '15 22:07

VaTo


2 Answers

If you haven't done so already, you may want to follow the instructions printed on my most recent install:

Add the following line to your ~/.bash_profile or ~/.zshrc file (and remember
to source the file to update your current session):
  [[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh

For example, if you added the line to .bash_profile, you can source it as follows:

. ~/.bash_profile

Or, just spin up a new command shell and the variables should have taken effect.

If you don't have any success with that, it's time to seriously trouble-shoot.

If you installed correctly, you should have a file named autojump.sh under your brew directory (which you can see using brew --prefix). If that file's there, you should be able to perform the following command, which should temporarily allow use of autojump commands in that particular shell:

. $(brew --prefix)/etc/profile.d/autojump.sh 

If you are successful with the autojump commands, it's a matter of modifying your .bashrc or .zshrc file as stated at the top of this answer.

If autojump commands are still nowhere in sight, I'd try a "brew uninstall autojump" followed by a "brew install autojump". Oh, and be sure to follow precisely the instructions in the "Caveats" section following the successful install.

like image 65
rholmes Avatar answered Nov 23 '22 06:11

rholmes


Assumed that you use zsh shell, you have to manually add the plugin link. See the instructions blew:

  1. in your terminal, open and edit .zshrc file by nano or vim:

    $ nano ~/.zshrc or $ vim ~/.zshrc

  2. add plugins=(autojump) in the .zshrc file enter image description here

  3. re-open your terminal

like image 20
KY Lu Avatar answered Nov 23 '22 07:11

KY Lu