From 29fa6863edda3c91dd384705e50dc14d9ea031f4 Mon Sep 17 00:00:00 2001 From: Donaldttt Date: Mon, 20 Jun 2022 22:36:58 -0400 Subject: [PATCH] update maching algorithm --- bash_tools/fzf_file_seletor.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bash_tools/fzf_file_seletor.sh b/bash_tools/fzf_file_seletor.sh index 2ed24f0..28c6f4c 100755 --- a/bash_tools/fzf_file_seletor.sh +++ b/bash_tools/fzf_file_seletor.sh @@ -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