7

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
Amelio Vazquez-Reina
  • 40,169
  • 77
  • 197
  • 294

2 Answers2

5

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](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins), 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. – LAFK says Reinstate Monica May 20 '14 at 15:35
3

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

KY Lu
  • 161
  • 3
  • 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 09:22
  • 1
    I want to explain it thoroughly, so I paste the whole image with a red frame. how should I modify it to let it be more useful to readers? – KY Lu Jan 15 '20 at 07:39