diff --git a/grep.sh b/grep.sh index fcba481..a5895d2 100644 --- a/grep.sh +++ b/grep.sh @@ -19,7 +19,8 @@ _grepFindFilesToGrep () { -not -wholename '*/node_modules/*' ) # TODO: reuse find.sh functions - local langfiles=($(find $_grepLangSearchPATH -regex ".*/$__brain_suffix"'[^/]*[^~]$\|.*'"$__brain_suffix$" $findargs)) + # This works for me, but don't know why I can't combine the two strings in the first regex. + local langfiles=($(find $_grepLangSearchPATH \( -regex ".*/$__brain_suffix""[^/]*[^~]$" -or -regex ".*$__brain_suffix$" \) $findargs)) local todos=($(find $_grepLangSearchPATH -name "todo" -type f)) for t in $todos; do langfiles+=$t; done #echo "XXX $langfiles" >&2