From: Michael D. Lowis Date: Sun, 1 Dec 2019 03:57:11 +0000 (-0500) Subject: set maxdepth on fcomplete to improve performance X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=3a6f688ef4dc335ea36f0d1ec4f66e6817d63fb4;p=projs%2Ftide.git set maxdepth on fcomplete to improve performance --- 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")"