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 fi
if [ -n "$*" ] if [ -n "$*" ]
then find "$root" -maxdepth 1 -type d | fzf -q "$*" then find "$root" -maxdepth 1 -type d | fzf -1 -q "$*"
else find "$root" -maxdepth 1 -type d | fzf else find "$root" -maxdepth 1 -type d | fzf -1
fi fi

View file

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