4

I just installed autojump and have oh-my-zsh installed in my system. I have included the log of the installation at the bottom of this post. Note that at the end it says:

zsh completion has been installed to:
/usr/local/share/zsh/site-functions

What am I supposed to do with this information? How do I notify Zsh of this zsh completion?

Also, whenever I now login with my Zsh shell, I get:

/usr/local/Cellar/autojump/21.6.9/etc/autojump.bash:13: command not found: complete
/usr/local/Cellar/autojump/21.6.9/etc/autojump.bash:52: = not found

Why? How can I fix this?

$ brew install autojump
==> Downloading https://github.com/joelthelion/autojump/archive/release-v21.6.9.tar.gz
############################################################################################################################ 100.0%
==> Caveats
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/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
  • I take it you are on OSX? – terdon Jan 29 '14 at 22:48
3

Oh-my-ZSH config file should have a line starting with plugins=, like this:

plugins=(git gitignore autojump jira command-not-found zsh-syntax-highlighting)

Whatever you put there is considered by ZSH to be an active plugin.

In case of AutoJump, oh-my-ZSH Plugin Wiki states that:

Enables autojump if installed with homebrew, macports or debian/ubuntu package. This does not add any commands on its own.

Config file you are looking for: .zshrc

EDIT:

  1. Note that some folks claim FASD is better, if autojump won't work for you, you may try FASD instead.

  2. Thanks @Adaephon, added link to source of the quote and marked it's oh-my-zshell rather than pure ZSH.

  • 2
    As you quote from the oh-my-zsh Plugin Page, I guess you are using oh-my-zsh. plugin= is part of the oh-my-zsh configuration, which is a set of configuration files for zsh. It is not part of vanilla zsh and as the questioner did not mention using oh-my-zsh it will probably not help him. – Adaephon May 20 '14 at 14:28
  • Thanks @Adaephon I updated the OP to clarify that I use oh-my-zsh and am interested in solutions that may depend on it. – Amelio Vazquez-Reina May 20 '14 at 14:37
  • Thanks @Adaephon - I've updated my answer to mark this as it's truly a good point. <bows> – LAFK says Reinstate Monica May 20 '14 at 15:35
0

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

  1. open .zshrc file

    nano ~/.zshrc

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

  3. re-open your terminal

  • 2
    It would have been less work for you and more useful to the reader to just copy the relevant text. – RalfFriedl Aug 19 '18 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.