HyperJump - simple and quick bookmark tool for bash and zsh shells. I found similar projects, but nothing that was both fast, easy to use, and simple enough. I really needed a location bookmarking app because I am working on a high latency connection, and switching between directories is a pain. It's also a nice memory aid. I installed it on all of the servers I manage, and now I can run something like jj httpd
and jump to the right config directory for the web server on that machine, regardless of the operating system it's running. So it's basically a tool to reduce your cognitive load.
HyperJump consists of 3 command line commands (functions).
- jr - Remember Jump. Bookmarks current directory. Run
jr nickname
to add current directory, or just runjr
and use the interactive mode. - jf - Forget Jump. Deletes the current directory from the bookmarks. Run
jf
while in a directory you want forgotten orjf nickname
to forget a specific nickname. - jj - Jump to a bookmark location. Run
jj nickname
to jump to a location or justjj
to get a list of all bookmarks. You can also runjj nickname command
to jump to a location and than run the command specified with "./" as the first argument. So, for instance, you can runjj myProject open subl
on OSX to jump to the myProject directory and open the myProject directory in Finder and Sublime Text.
All of the commands have autocomplete. Both jj and jf will autocomplete with nicknames of bookmarked locations. The jr command will autocomplete with the basename of the current directory. After the first argument, jj will autocomplete with list of available system commands (programs).
Examples:
# Remember current directory
$ jr
$ jr MyDir
# Forget current directory
$ jf
# Forget another directory
$ jf AnotherDir
# Jump to a Directory
$ jj
$ jj MyDir
# Jump to a directory and open the directory in another program(s)
$ jj MyDir open
$ jj MyDir open subl tm
Download hyperjump bash script and place it somewhere on your system, such as ~/bin/hyperjump
. Add the following line to your .profile, .bashrc or .zshrc file:
source /location/of/hyperjump
Optional: To get the list of all the Bookmarks in a nice looking menu window, you need a unix utility called dialog. You can install it via yum, apt-get, homebrew, ports, and others like so:
sudo yum install dialog
sudo apt-get install dialog
brew install dialog
sudo port install dialog
Released under the MIT License. Use it, love it, fork it, make changes, send pull requests. Enjoy!