zsh completion installations (autojump) - How to use them?
Solution 1
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:
Note that some folks claim FASD is better, if autojump won't work for you, you may try FASD instead.
Thanks @Adaephon, added link to source of the quote and marked it's oh-my-zshell rather than pure ZSH.
Solution 2
Assumed that you use zsh
shell, you have to manually add the plugin link.
See the instructions blew:
Related videos on Youtube
Amelio Vazquez-Reina
I'm passionate about people, technology and research. Some of my favorite quotes: "Far better an approximate answer to the right question than an exact answer to the wrong question" -- J. Tukey, 1962. "Your title makes you a manager, your people make you a leader" -- Donna Dubinsky, quoted in "Trillion Dollar Coach", 2019.
Updated on September 18, 2022Comments
-
Amelio Vazquez-Reina over 1 year
I just installed
autojump
and haveoh-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
-
Admin over 10 yearsI take it you are on OSX?
-
-
Adaephon about 10 yearsAs 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. -
Amelio Vazquez-Reina about 10 yearsThanks @Adaephon I updated the OP to clarify that I use
oh-my-zsh
and am interested in solutions that may depend on it. -
LAFK says Reinstate Monica about 10 yearsThanks @Adaephon - I've updated my answer to mark this as it's truly a good point. <bows>
-
RalfFriedl almost 6 yearsIt would have been less work for you and more useful to the reader to just copy the relevant text.
-
KY Lu over 4 yearsI 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?