refactor(shell): update navigation aliases and improve fuzzy selector UX
- Standardize path aliases: rename `cnf` to `cfg`, add `lrn` (Learn) and `dep` (Deployments) to align with new folder structure. - Improve `jump.sh`: Update fuzzy selector to include the base directory as an option, ensuring users can navigate to parent folders directly via `fzf`. - Update `appctl` shell alias to reflect the new `~/Deployments` directory location.
This commit is contained in:
1 parent
6127ab3720
commit
6e0389a113
2 files changed
+8
-7
No files matched your search
@@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
# Shell Aliases for speed, productivity, and command overrides
|
# Shell Aliases for speed, productivity, and command overrides
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
appctl = "/home/kiskaadee/Production/traefik-deployments/appctl";
|
appctl = "/home/kiskaadee/Deployments/traefik-deployments/appctl";
|
||||||
zed = "zeditor";
|
zed = "zeditor";
|
||||||
reload = "exec bash";
|
reload = "exec bash";
|
||||||
ff = "fastfetch --logo none";
|
ff = "fastfetch --logo none";
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ _fuzzy_select_dir() {
|
|||||||
local query="$2"
|
local query="$2"
|
||||||
local max_depth="${3:-2}"
|
local max_depth="${3:-2}"
|
||||||
[[ -d "$base" ]] || return 1
|
[[ -d "$base" ]] || return 1
|
||||||
fd . "$base" --type d --mindepth 1 --max-depth "$max_depth" 2>/dev/null | \
|
(echo "$base"; fd . "$base" --type d --mindepth 1 --max-depth "$max_depth" 2>/dev/null) | \
|
||||||
fzf --query="$query" --select-1 --exit-0
|
fzf --query="$query" --select-1 --exit-0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ _fuzzy_select_dir_preview() {
|
|||||||
local query="$2"
|
local query="$2"
|
||||||
local max_depth="${3:-2}"
|
local max_depth="${3:-2}"
|
||||||
[[ -d "$base" ]] || return 1
|
[[ -d "$base" ]] || return 1
|
||||||
fd . "$base" --type d --mindepth 1 --max-depth "$max_depth" 2>/dev/null | \
|
(echo "$base"; fd . "$base" --type d --mindepth 1 --max-depth "$max_depth" 2>/dev/null) | \
|
||||||
fzf --query="$query" --select-1 --exit-0 \
|
fzf --query="$query" --select-1 --exit-0 \
|
||||||
--preview 'eza --tree --level 2 --icons=always --color=always {}' \
|
--preview 'eza --tree --level 2 --icons=always --color=always {}' \
|
||||||
--preview-window="right:50%:rounded"
|
--preview-window="right:50%:rounded"
|
||||||
@@ -86,8 +86,9 @@ copy_dir() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# 10. Shorthand Navigation Aliases
|
# 10. Shorthand Navigation Aliases
|
||||||
cnf() { jump "$HOME/Config" "$1" 2; } # Quickly jump inside ~/Config modules
|
cfg() { jump "$HOME/Config" "$1" 2; } # Quickly jump inside ~/Config modules
|
||||||
pj() { jump "$HOME/Projects" "$1"; } # Jump into local workspace projects
|
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
|
dl() { jump "$HOME/Downloads" "$1"; } # Jump to Downloads
|
||||||
pd() { jump "$HOME/Production" "$1"; } # Jump to Production folder
|
med() { jump "/media" "$1"; } # Jump to /media mounted storage
|
||||||
md() { jump "/media"; } # Jump to /media mounted storage
|
|
||||||
Reference in new issue
Block a user