jmp is a Homebrew-installed command-line utility to quickly navigate to frequently used directories using a cached list and fzf.
To use jmp, ensure you have the following software installed:
fzf: A command-line fuzzy finder for interactive directory selection.fd(optional): A faster alternative tofindfor directory traversal.tmux(optional): Required forfzf-tmuxif you want to usejmpinside a tmux session.
Install jmp with Homebrew:
brew tap totosuki/jmp brew install jmp
After installation, add the following alias to your shell configuration (.zshrc or .bashrc)
alias jmp='source jmp'
Reload your shell
source ~/.zshrc # or source ~/.bashrc
jmp [OPTIONS]
-u, --updateUpdate the directory cache file.-h, --helpShow the help message.
-
Cache Creation:
Thejmpcommand generates a cache of directories in your home directory. This can be updated using the--updateoption. -
Directory Selection:
Usefzfto interactively select a directory from the cached list. -
Directory Jumping:
After selection,jpchanges the current working directory to the chosen one.
For the best experience, we recommend installing:
fd: A faster alternative tofindfor building the directory cache.fzf: A command-line fuzzy finder for directory selection.tmux: Required forfzf-tmux, enabling directory selection inside a tmux session.
fd: Optimized for speed. Example: Updating the cache withfdmight take ~1 second.find: Slower but universally available. Example: Updating the cache withfindmight take 5-10 seconds.
- If
fzf-tmuxis available,jmpwill automatically use it when inside a tmux session. Otherwise,fzfwill be used as a fallback. - To use
fzf-tmux, ensure thattmuxis installed and you are in an active tmux session.
To remove jmp, run:
brew uninstall jmp
You may also want to remove the alias from your .zshrc or .bashrc.