Make fuzzy finders instantly return single match

This commit is contained in:
Talia 2023-06-01 15:23:13 +02:00
parent dba2f18138
commit e09e3045e8
2 changed files with 4 additions and 4 deletions

View File

@ -9,6 +9,6 @@ else
fi
if [ -n "$*" ]
then find "$root" -maxdepth 1 -type d | fzf -q "$*"
else find "$root" -maxdepth 1 -type d | fzf
then find "$root" -maxdepth 1 -type d | fzf -1 -q "$*"
else find "$root" -maxdepth 1 -type d | fzf -1
fi

View File

@ -3,6 +3,6 @@
root=$1
shift 1
if [ -n "$*" ]
then find $root -type d -name .git | xargs dirname | fzf -q "$*"
else find $root -type d -name .git | xargs dirname | fzf
then find $root -type d -name .git | xargs dirname | fzf -1 -q "$*"
else find $root -type d -name .git | xargs dirname | fzf -1
fi