update maching algorithm

This commit is contained in:
Donaldttt
2022-06-20 22:36:58 -04:00
parent 02e9077424
commit 29fa6863ed
+3 -2
View File
@@ -110,7 +110,7 @@ function fzf_selector() {
files=()
# match
# 1. try match file/dir equals to keyword completely
# 2. try match file/dir which keyword (contains upper letters) is substring of
# 2. try match file/dir which keyword is substring of
# 3. try match file/dir equals to keyword completely after ignoring cases
# 4. try match file/dir which keyword is substring of after ignoring cases
@@ -121,7 +121,8 @@ function fzf_selector() {
fi
# 2.
[[ $1 =~ [A-Z] ]] && \
# this line ignore cases
# [[ $1 =~ [A-Z] ]] && \
grep $1 <<< $item > /dev/null 2>&1 && \
files+=("$item")
done