mirror of
https://github.com/Xevion/dotfiles.git
synced 2026-01-31 06:24:13 -06:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user