Files
dotfiles/home/dot_config/fish/functions/_fzf_discover_home.fish
Xevion 349b23e025 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)
2026-01-09 13:06:57 -06:00

19 lines
673 B
Fish

# 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