Make directory bookmarks and jump to them, even relative to environment variables.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
jj.py

README.md

Jump Jump!

How often do you find yourself typing the same cd commands to the same directories over and over?

This tool lets you save bookmarks for your frequently-used directories, and jump quickly back to them - even if they were defined relative to an environment variable.

Recommended use:

alias jj='cd $(jj.py)'   # choose a path to jump to
alias jjk='jj.py k'      # store the current path

If you're on Cygwin, use this jj alias instead:

alias jj='cd $(cygpath -w -m $(jj.py))'

It remembers the most recent 16 paths stored.

Simple, but with a nifty twist:

Suppose you have an (exported) variable FOO=/path/to, and you're in /path/to/your/directory. Sometimes, you might want to save the literal path, but perhaps other times you're actually interested in $FOO/your/directory - so that later, when $FOO is different, the bookmark refers to the current $FOO.

Jump Jump is smart:

~/foo/bar/baz $ export AAA=$HOME/foo
~/foo/bar/baz $ export BBB=$HOME/foo/bar
~/foo/bar/baz $ jjk
Store:
a) /home/dmd/foo/bar/baz
b) $BBB/baz
c) $AAA/bar/baz

Note that it gave me several choices; the literal path, and two paths based on environment variables it found (in decreasing greediness).

See also