refactor: replace lazy zoxide with eager init and add fd-based directory discovery

- Switch from lazy-loaded z/zi to eager zoxide initialization in config.fish
- Alias cd to use zoxide for automatic frecency tracking
- Add Alt+D: discover directories from git root/cwd with fd+fzf (no gitignore)
- Add Alt+Shift+D: discover directories from HOME with fd+fzf (depth 5)
This commit is contained in:
2026-01-09 13:06:57 -06:00
parent 4d0092a062
commit 349b23e025
5 changed files with 69 additions and 35 deletions
@@ -0,0 +1,18 @@
# Directory finder starting from HOME with fd + fzf (shows all directories)
function _fzf_discover_home --description "Alt+Shift+D: Discover directories from HOME with fd+fzf"
set -l selected (
fd --type d --hidden --no-ignore --max-depth 5 \
--exclude .git --exclude node_modules \
. "$HOME" | \
fzf --height=50% \
--preview="lsd -1 --color=always --icon=always {}" \
--preview-window=right,40% \
--prompt="🏠 Home > " \
--header="Searching from: $HOME (max depth 5, all dirs)"
)
if test -n "$selected"
cd "$selected"
commandline -f repaint
end
end