QJump (short for QuickJump) allows you to bookmark directories on your local machine and switch between them easily. It's like a URL shortener but it's designed for your local machine.
I tried it under Linux only. It works with Bash, ZSH and Fish shells (settings are included). I think it should also work under Mac OS.
After the bookmark, you can also specify a substring and you'll be redirected to the first subdirectory whose name contains this substring:
$ cd
$ pwd
/home/jabba
$ qj nim
$ pwd
/home/jabba/Dropbox/nim
$ cd
$ pwd
/home/jabba
$ qj nim/26
$ pwd
/home/jabba/Dropbox/nim/Nim-2026Here, only "nim" was present in the database. However,
"nim/26" worked and the current directory was changed to ".../nim/Nim-2026".
During my daily work, there are some folders that I visit regularly. QJump lets me change directories with the speed of light :)
- In the source code (
qjump.nim), modify the value ofDB_FILE. It contains the path of the database file that will be created. If you modify anything, don't forget to recompile the project (see theMakefile). - Add the content of
function.bash/function.zsh/function.fishto your shell's settings file (depending on what shell you use). Modify the variableQJto point to the binaryqjump. - Open a new terminal and issue the command
qj, which calls the shell function. When you callqjfor the first time and no database file exists yet, thenqjumpwill create a simple DB file that you can extend later.
QJump generates a hash for a directory, it'll be the bookmark. You are encouraged to change it by editing the database file (qjump.txt) manually.
Just make sure that all bookmarks are unique.
The program generates 3-character-long bookmarks but you can use
shorter / longer bookmarks if you want.
