From 3a6f688ef4dc335ea36f0d1ec4f66e6817d63fb4 Mon Sep 17 00:00:00 2001 From: "Michael D. Lowis" Date: Sat, 30 Nov 2019 22:57:11 -0500 Subject: [PATCH] set maxdepth on fcomplete to improve performance --- bin/fcomplete | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/fcomplete b/bin/fcomplete index 63a2122..bb002cb 100755 --- a/bin/fcomplete +++ b/bin/fcomplete @@ -3,4 +3,4 @@ orig="$1" path="${orig%/*}" file="${orig##*/}" [ "$path" = "$file" ] && path="." -printf "%s" "$(find "$path" -path "$path/$file*" | pick "$path/$file")" +printf "%s" "$(find "$path" -maxdepth 1 -path "$path/*$file*" | pick "$path/$file")" -- 2.52.0