A lightweight, POSIX-compatible directory bookmark manager for Bash, Zsh, and Fish.
Register named shortcuts to directories and jump to them instantly — with tab completion and subpath navigation.
$ goto -r work ~/Projects/myapp
[ok] Registered: 'work' -> /home/user/Projects/myapp
$ goto work
/home/user/Projects/myapp $
$ goto work/src/components
/home/user/Projects/myapp/src/components $
- Bookmark any directory — register with
goto -r nameorgoto -r name /path - Subpath navigation —
goto project/src/libjumps into subdirectories - Tab completion — shortcut names and subpaths complete in all shells
- Cleanup — remove broken shortcuts pointing to deleted directories
- Import/export — back up or transfer shortcuts between machines
- Zero dependencies — pure POSIX shell, no Python/Ruby/Rust needed
- XDG compliant — respects
$XDG_CONFIG_HOME - Shell support — Bash, Zsh, and Fish
git clone https://github.com/byteoverride/goto.git
cd goto
./install.shThen add to your shell config:
# Bash (~/.bashrc) or Zsh (~/.zshrc)
source ~/.local/bin/goto.shFish integration is installed automatically if Fish is detected.
sudo make install PREFIX=/usrThen add to your shell config:
# Bash (~/.bashrc) or Zsh (~/.zshrc)
source /usr/share/goto/goto.shFish completions are loaded automatically from the system path.
yay -S goto-dir# User-local
rm ~/.local/bin/goto ~/.local/bin/goto.sh
# System-wide
sudo make uninstall PREFIX=/usr# Save current directory
goto -r work
# Save a specific path
goto -r docs ~/Documents
# Relative paths are resolved automatically
goto -r parent ..goto work
goto docsgoto work/src/components
goto docs/api/v2goto -lOutput shows valid shortcuts and marks missing paths:
Registered shortcuts:
work -> /home/user/Projects/myapp
docs -> /home/user/Documents
old-project -> /home/user/Projects/deleted (missing)
goto -d workgoto -R work officegoto -c# Back up shortcuts
goto --export > ~/goto-backup.txt
# Restore on another machine
goto --import ~/goto-backup.txtShortcuts are stored in a plain-text file:
~/.config/goto/config
Or $XDG_CONFIG_HOME/goto/config if XDG_CONFIG_HOME is set.
Format is one shortcut per line, pipe-delimited:
work|/home/user/Projects/myapp
docs|/home/user/Documents
You can edit this file directly if needed.
goto is split into two parts:
-
goto(binary) — a POSIX shell script that manages the config file and resolves shortcuts. It outputs the resolved path to stdout. -
goto.sh(shell integration) — a shell function that wraps the binary, captures its output, and callscd. This is why you need tosourceit — shell functions can change the current directory, standalone scripts cannot.
| Feature | goto | autojump | z / zoxide | fasd |
|---|---|---|---|---|
| Explicit bookmarks | Yes | No | No | No |
| Learning/frecency | No | Yes | Yes | Yes |
| Zero dependencies | Yes | Python | Rust (zoxide) | POSIX |
| Subpath navigation | Yes | No | No | No |
| Import/export | Yes | No | No | No |
| Config is plain text | Yes | No | No | No |
goto takes a different approach: explicit bookmarks instead of implicit learning. You control exactly which directories have shortcuts and what they're called. No database, no training period, no surprises.
# Run tests
make test
# Run shellcheck
make lint
# Test the install process
make install DESTDIR=/tmp/goto-test PREFIX=/usrSee CONTRIBUTING.md for development guidelines.
MIT - Psalms Christopher Matovu