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`) and full mnemonic functions (`brain`, `conf`, `doc`, `pic`). - Retain backward-compatibility mappings for legacy shorthand aliases (`cfg`, `prj`, `docs`, `pict`).
This commit is contained in:
1 parent
aa5708a28d
commit
ac21cf7345
2 files changed
+29
-7
No files matched your search
@@ -37,6 +37,16 @@ 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 repositories. |
|
||||
|
||||
---
|
||||
|
||||
## 3. Modular Shell Scripts (`home/shell/`)
|
||||
|
||||
+19
-7
@@ -85,10 +85,22 @@ 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
|
||||
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 "$@"; }
|
||||
|
||||
# Convenience & Backward-Compatibility Aliases
|
||||
docs() { doc "$@"; }
|
||||
pict() { pic "$@"; }
|
||||
cfg() { conf "$@"; }
|
||||
prj() { pj "$@"; }
|
||||
Reference in new issue
Block a user