feat(shell): expand directory navigation helpers with 2-letter shortcuts and mnemonic aliases

- Add documentation table for directory navigation jumps in `docs/reference/shell.md`.
- Refactor `home/shell/jump.sh` to provide dual 2-letter shortcuts (`br`, `cf`, `dc`, `pi`, `pj`, `hl`) and full mnemonic functions (`homelab`, `brain`, `conf`, `doc`, `pic`).
- Retain backward-compatibility mappings for legacy shorthand aliases (`cfg`, `prj`, `docs`, `pict`).
This commit is contained in:
kiskaadee committed 2026-09-14 15:55:32 -05:00
1 parent aa5708a28d
commit a19ed0aec6
2 files changed
+32 -7

No files matched your search

+11
View File
@@ -37,6 +37,17 @@ The shell environment is modularized:
| `gd` | `git diff` | Syntax-highlighted git diff via Delta. |
| `gl` | `git log --oneline --graph --decorate` | Compact visual commit graph. |
### Directory Navigation Jumps (`home/shell/jump.sh`)
| 2-Letter | Word Alias | Target Directory | Description |
| :--- | :--- | :--- | :--- |
| `br` | `brain` | `~/Brain` | Second brain knowledge base. |
| `cf` | `conf` / `cfg` | `~/Config` | Declarative NixOS configuration. |
| `dc` | `doc` / `docs` | `~/Documents` | Personal documents. |
| `dl` | `dl` | `~/Downloads` | Downloads folder. |
| `pi` | `pic` / `pict` | `~/Pictures` | Wallpapers, images, screenshots. |
| `pj` | `pj` / `prj` | `~/Projects` | Local workspace for project repositories. |
| `hl` | `hl` / `homelab` | `~/Homelab` | Local workspace for homelab repositories. |
---
## 3. Modular Shell Scripts (`home/shell/`)
+21 -7
View File
@@ -85,10 +85,24 @@ copy_dir() {
printf "%s" "$dir" | wl-copy
}
# 10. Shorthand Navigation Aliases
cfg() { jump "$HOME/Config" "$1" 2; } # Quickly jump inside ~/Config modules
prj() { jump "$HOME/Projects" "$1"; } # Jump into local workspace projects
lrn() { jump "/$HOME/Learn" "$1"; } # Jump to ~/Learn
dep() { jump "$HOME/Deployments" "$1"; } # Jump to Deployments folder
dl() { jump "$HOME/Downloads" "$1"; } # Jump to Downloads
med() { jump "/media" "$1"; } # Jump to /media mounted storage
# 10. Shorthand Navigation Aliases (Dual 2-letter and mnemonic mapping)
brain() { jump "$HOME/Brain" "$1" 2; } # Jump into ~/Brain
homelab() { jump "$HOME/Homelab" "$1" 2; } # Jump into ~/Homelab
conf() { jump "$HOME/Config" "$1" 2; } # Jump into ~/Config
doc() { jump "$HOME/Documents" "$1" 2; } # Jump into ~/Documents
dl() { jump "$HOME/Downloads" "$1" 2; } # Jump into ~/Downloads
pic() { jump "$HOME/Pictures" "$1" 2; } # Jump into ~/Pictures
pj() { jump "$HOME/Projects" "$1" 3; } # Jump into ~/Projects (depth 3)
# 2-Letter Fast Aliases
br() { brain "$@"; }
cf() { conf "$@"; }
dc() { doc "$@"; }
pi() { pic "$@"; }
hl() { homelab "$@"; }
# Convenience & Backward-Compatibility Aliases
docs() { doc "$@"; }
pict() { pic "$@"; }
cfg() { conf "$@"; }
prj() { pj "$@"; }