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 fi
if [ -z "$arg" ]; then if [ -z "$arg" ]; then
if $hidden; then if $hidden; then
result="$($FZF_DEFAULT_COMMAND --hidden | fzf)" result="$($FZF_DEFAULT_COMMAND --type d --hidden | fzf)"
if [ -d "$result" ]; then if [ -d "$result" ]; then
cd "$result" cd "$result"
fi fi
return 0 return 0
fi fi
result="$(fzf $arg)" result="$(fd . $HOME --type d | fzf)"
if [ -d "$result" ]; then if [ -d "$result" ]; then
cd "$result" cd "$result"
return 0 return 0