Installing Autojump From Source
While browsing the web, I came across a helpful CLI tool that can help users navigate the filesystem more efficiently. The tool is called autojump and works by keeping a database of the directories users use most frequently from the command line. With this tool, I can save time and optimize my workflow, especially when I work with long or complex directory structures.
I’m running iTerm2 with oh-my-zsh plugin. The docs read that it can be installed using brew on Mac, however that didn’t worked for me. So I tried building from source, here is how to do that:
Launch your terminal and run
git clone https://github.com/wting/autojump.git
cd autojump
./install.py
After installation, you will be asked to add a line or two to shell config ./zshrc. Run vim ~/.zshrc
, press G to go to the footer and paste your lines there and press :wq to save and exit from vim. The lines to append will be specific to your filesystem.
##### AUTOJUMP #####
[[ -s /Users/wired/.autojump/etc/profile.d/autojump.sh ]] && source /Users/wired/.autojump/etc/profile.d/autojump.sh
autoload -U compinit && compinit -u
After saving the lines in shell config, restart your terminal or run source ~/.zshrc
and you will be ready to use autojump. Note that directories must be visited first before they can be jumped to.
Some useful commands
j -h
- show help messagej -v
- display version infoj -s
- show database entriesj folio
- jump to a directory containing folio in name string
The tool is supported across multiple platforms, you can find installation intructions for other OSes in the README.
Let me know what other CLI tools you use. You can reply me via mail