A universal, colorful bookmark manager for your terminal. Quickly save and navigate to your favorite directories.
- 🔖 Save current directory as a bookmark
- 🗑️ Remove bookmarks
- 📋 List all bookmarks with current directory highlighting
- 🚀 Quick navigation to bookmarked directories
- 🎨 Colorful output
- 💾 Persistent storage in
~/.config/bm/list - ⌨️ Tab completion for bookmark names
- Download the script:
curl -o ~/.bm.sh https://github.com/PhateValleyman/bm/raw/refs/heads/master/bm.sh- Add to your
~/.bashrc:
source ~/.bm.sh- Reload your shell:
source ~/.bashrcSave the current directory as a bookmark:
bm -a myproject
# Output: [bm] Added myproject → /home/user/projects/myprojectDisplay all saved bookmarks (current directory is highlighted with 📌):
bm -l
# Output:
# === Saved bookmarks ===
# myproject /home/user/projects/myproject 📌
# downloads /home/user/Downloads
# documents /home/user/DocumentsGo to a bookmarked directory:
bm -g myproject
# or simply:
bm myproject
# Output: Opening: /home/user/projects/myprojectDelete a bookmark:
bm -r myproject
# Output: [bm] Removed bookmark myprojectDisplay version information:
bm -v
# Output:
# bm v1.5
# by PhateValleyman
# Jonas.Ned@outlook.comDisplay help message:
bm -h
# or simply:
bm| Command | Alias | Description |
|---|---|---|
bm -a <name> |
bm --add <name> |
Add current directory as bookmark |
bm -r <name> |
bm --remove <name> |
Remove bookmark |
bm -l |
bm --list |
List all bookmarks |
bm -g <name> |
bm --go <name> |
Go to bookmark |
bm -v |
bm --version |
Show version information |
bm -h |
bm --help |
Show help message |
bm <name> |
- | Shortcut to go to bookmark |
# Navigate to a project directory
cd ~/projects/my-awesome-app
# Save it as a bookmark
bm -a awesome
# [bm] Added awesome → /home/user/projects/my-awesome-app
# Go anywhere else
cd /tmp
# Return to your bookmarked directory
bm awesome
# Opening: /home/user/projects/my-awesome-app
# List all bookmarks
bm -l
# === Saved bookmarks ===
# awesome /home/user/projects/my-awesome-app 📌# Add multiple bookmarks
cd ~/Downloads && bm -a dl
cd ~/Documents && bm -a docs
cd ~/projects/website && bm -a web
cd ~/.config && bm -a config
# List them all
bm -l
# === Saved bookmarks ===
# config /home/user/.config 📌
# dl /home/user/Downloads
# docs /home/user/Documents
# web /home/user/projects/website
# Navigate quickly
bm web
bm docs
bm dl# Remove a bookmark you no longer need
bm -r oldproject
# [bm] Removed bookmark oldprojectThe script includes bash completion for bookmark names. Just type bm and press Tab to see available options and bookmark names:
bm <Tab><Tab>
# Shows: -a --add -r --remove -l --list -g --go -v --version -h --help awesome dl docs web config
bm -g <Tab><Tab>
# Shows only bookmark names: awesome dl docs web configBookmarks are stored in:
~/.config/bm/list
The file uses bash associative array syntax and can be manually edited if needed.
- Bash 4.0 or higher (for associative arrays)
- Standard Unix utilities (mkdir, printf, cd)
PhateValleyman
- Email: Jonas.Ned@outlook.com
- GitHub: https://github.com/PhateValleyman
Current version: 1.5