fix(bug): make cdf only search for directories

This commit is contained in:
Seymur Bagirov 2024-04-26 11:50:07 +04:00
parent 7920362bd3
commit bd456bec5d

View File

@ -96,13 +96,13 @@ cdf(){
fi
if [ -z "$arg" ]; then
if $hidden; then
result="$($FZF_DEFAULT_COMMAND --hidden | fzf)"
result="$($FZF_DEFAULT_COMMAND --type d --hidden | fzf)"
if [ -d "$result" ]; then
cd "$result"
fi
return 0
fi
result="$(fzf $arg)"
result="$(fd . $HOME --type d | fzf)"
if [ -d "$result" ]; then
cd "$result"
return 0