From e09e3045e80d0ca0f524dcec94a6c6178a6b1fad Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 1 Jun 2023 15:23:13 +0200 Subject: [PATCH] Make fuzzy finders instantly return single match --- bin/find-dir | 4 ++-- bin/find-git-project | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/find-dir b/bin/find-dir index 6fcf5dc..62bbf9a 100755 --- a/bin/find-dir +++ b/bin/find-dir @@ -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 diff --git a/bin/find-git-project b/bin/find-git-project index 07a9d84..004e4dd 100755 --- a/bin/find-git-project +++ b/bin/find-git-project @@ -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