- Nim 87.9%
- Shell 7.2%
- Python 3.4%
- Makefile 1.5%
| converter | ||
| demo | ||
| src | ||
| .gitignore | ||
| config.nims | ||
| function.bash | ||
| function.fish | ||
| function.zsh | ||
| LICENSE | ||
| Makefile | ||
| qjump.nim | ||
| qjump.nimble | ||
| README.md | ||
QJump
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.
Supported platforms
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.
Demo
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-2026
Here, only "nim" was present in the database. However,
"nim/26" worked and the current directory was changed to ".../nim/Nim-2026".
Help
QJump 0.3.4 by Jabba Laci (jabba.laci@gmail.com), 2026
https://github.com/jabbalaci/qjump
Usage: qj [alias] [option]
Location of DB file: /home/jabba/Dropbox/qjump.txt
Provide an alias (bookmark) or use one of these options:
-h, --help show this help
-v, --version version info
-l, --list show list of available aliases
-d, --dead list dead (non-existing) paths
-a, --alive list existing paths
Motivation
During my daily work, there are some folders that I visit regularly. QJump lets me change directories with the speed of light :)
Installation
- The program tries to read the environment variable
DROPBOX. If it exists, then the database file will be created inside your Dropbox folder, thus you'll get auto synchronization. If this env. variable doesn't exist, then the database file will be created in your HOME folder. When you ask the help (--help), the location of the database file will be printed. - If you're not satisfied with these default values,
then modify the value of
DB_FILEin the source code. 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.
Notes
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.
