Highjump is a fast and intuitive CLI tool for bookmarking directories and navigating between them seamlessly. It provides an interactive fuzzy search interface to jump to your frequently used paths.
- Bookmark current directory: Easily save your current working directory.
- Interactive fuzzy search: Find and jump to saved directories using keyboard arrows, typing path names, or selecting index numbers.
- Persistent storage: Paths are securely saved in
~/.highjump_paths.json.
First, clone the repository and build the project using Cargo:
git clone https://github.com/hooneun/highjump
cd highjump
cargo build --releaseMove the compiled binary to a directory included in your system's PATH:
cp target/release/highjump ~/.cargo/bin/highjump(Make sure ~/.cargo/bin or your chosen directory is in your $PATH.)
Due to the fundamental design of UNIX-like operating systems, a child process (the Rust CLI) cannot change the current working directory of its parent process (the Shell).
To enable the cd functionality, you must add a shell function. Add the following code to your ~/.zshrc or ~/.bashrc:
# Highjump shell wrapper
function hj() {
if [[ "$1" == -* ]]; then
highjump "$@"
else
local TARGET_DIR=$(highjump "$@")
if [ -n "$TARGET_DIR" ] && [ -d "$TARGET_DIR" ]; then
cd "$TARGET_DIR" || return
fi
fi
}~/.config/fish/functions/hj.fish
function hj
if string match -q -- "-*" $argv[1]
highjump $argv
else
set -l TARGET_DIR (highjump $argv)
if test -n "$TARGET_DIR"; and test -d "$TARGET_DIR"
cd "$TARGET_DIR"; or return
end
end
endReload your shell configuration:
source ~/.zshrc # or source ~/.bashrcUse the hj command for all operations.
Save the current directory:
hj --save
# or
hj -sJump to a saved directory:
hjThis will open an interactive prompt. You can:
- Use Up/Down arrow keys to navigate.
- Type the index number to filter by number.
- Type part of the directory path to fuzzy search.
- Press Enter to jump.
View Help:
hj --help