How to install autojump for Fish

Autojump is a tool that can be used to jump around in the shell to frequently used directories by typing just a part of their name. It is typically aliased to j. Autojump is available as a package in the Ubuntu repositories, but that is an old version that does not support the fish shell. Installing the latest version for fish is pretty easy:

  • Clone the autojump repository:
$ git clone
  • Install autojump to a local ~/.autojump directory:
$ cd autojump
$ ./
  • Source the file in your fish configuration, by opening the file ~/.config/fish/ in an editor and adding these lines:
    set --local AUTOJUMP_PATH $HOME/.autojump/share/autojump/
    if test -e $AUTOJUMP_PATH
        source $AUTOJUMP_PATH
  • Exit the fish shell and start it again. Visit your commonly used directories with the cd command. You can now jump to these directories by using the j command:
$ cd /some/superlongdirectoryname
$ cd
$ j tory
$ pwd
  • To see statistics of entries in autojump history:
$ j -s

Tried with: Autojump 22.2.4, Fish 2.2b1 and Ubuntu 14.04

3 thoughts on “How to install autojump for Fish”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s