]> git.mdlowis.com Git - projs/tide.git/commitdiff
set maxdepth on fcomplete to improve performance
authorMichael D. Lowis <mike.lowis@gentex.com>
Sun, 1 Dec 2019 03:57:11 +0000 (22:57 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Sun, 1 Dec 2019 03:57:11 +0000 (22:57 -0500)
bin/fcomplete

index 63a21227531acc7c01d197dc0b5388b46acc165c..bb002cba94d179efe8d0cb51dbe18e73a53b36ef 100755 (executable)
@@ -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")"