@@ -180,13 +180,13 @@ for I in $(seq -f '%02g' 0 $(($SPLIT-1)) ) ; do
180180 # also make error small case and escape special chars: () |
181181 ERRORSMALLCASE=$( echo ${ERRORNOCOLOR,,} | ${GP} sed -r ' s/\(/\\(/g' | ${GP} sed -r ' s/\)/\\)/g' | ${GP} sed -r ' s/\|/\\|/g' )
182182 if [[ ! " ${ERRORSMALLCASE} " =~ $IGNORECASE_INWORD ]]; then
183- if [[ -n $( ag --nonumbers --case-sensitive " ^${ERRORSMALLCASE: 1:- 1}${ERRORSMALLCASE: -1} ?:" scripts/spell_check/spelling.dat) ]]; then
183+ if [[ -n $( ag --noaffinity -- nonumbers --case-sensitive " ^${ERRORSMALLCASE: 1:- 1}${ERRORSMALLCASE: -1} ?:" scripts/spell_check/spelling.dat) ]]; then
184184 PREVCHAR=${ERROR:: 1}
185185 # remove first character
186186 ERRORSMALLCASE=${ERRORSMALLCASE# ?}
187187 ERROR=${ERROR# ?}
188188 fi
189- if [[ -n $( ag --nonumbers --case-sensitive " ^${ERRORSMALLCASE::- 1} :" scripts/spell_check/spelling.dat) ]]; then
189+ if [[ -n $( ag --noaffinity -- nonumbers --case-sensitive " ^${ERRORSMALLCASE::- 1} :" scripts/spell_check/spelling.dat) ]]; then
190190 NEXTCHAR=${ERROR: ${# ERROR} -1: 1}
191191 # remove last character
192192 ERRORSMALLCASE=${ERRORSMALLCASE::- 1}
@@ -196,9 +196,9 @@ for I in $(seq -f '%02g' 0 $(($SPLIT-1)) ) ; do
196196 ERRORSMALLCASE=$( ${GP} sed -r ' s/\./\\./g' <<< $ERRORSMALLCASE )
197197
198198 # get correction from spelling.dat
199- CORRECTION=$( ag --nonumbers --case-sensitive " ^${ERRORSMALLCASE} :" ${DIR} /spelling.dat | cut -d: -f2)
199+ CORRECTION=$( ag --noaffinity -- nonumbers --case-sensitive " ^${ERRORSMALLCASE} :" ${DIR} /spelling.dat | cut -d: -f2)
200200 # exclude script files
201- if [[ " $( ag --nonumbers --case-sensitive " ^${ERRORSMALLCASE} :" ${DIR} /spelling.dat | cut -d: -f3) " =~ " %" ]]; then
201+ if [[ " $( ag --noaffinity -- nonumbers --case-sensitive " ^${ERRORSMALLCASE} :" ${DIR} /spelling.dat | cut -d: -f3) " =~ " %" ]]; then
202202 if [[ " $FILE " =~ $EXCLUDE_SCRIPT_LIST ]]; then
203203 echo " skipping script file for $( ${GP} sed -r ' s/\\//g' <<< $ERRORSMALLCASE ) "
204204 continue
@@ -208,7 +208,7 @@ for I in $(seq -f '%02g' 0 $(($SPLIT-1)) ) ; do
208208 if [[ -z " $CORRECTION " ]]; then
209209 CORRECTION=$( perl -e " use strict; use warnings; while(<>) { chop; my(\$ a,\$ b) = split /:/; \$ a = qr(\$ a); if( my @matches = '${ERRORSMALLCASE} ' =~ /^\$ a\$ /i ) { print sprintf(\$ b, @matches); last; }}" ${DIR} /spelling.dat )
210210 # exclude script files
211- if [[ " $( ag --nonumbers --case-sensitive " :${CORRECTION} " ${DIR} /spelling.dat | cut -d: -f3) " =~ " %" ]]; then
211+ if [[ " $( ag --noaffinity -- nonumbers --case-sensitive " :${CORRECTION} " ${DIR} /spelling.dat | cut -d: -f3) " =~ " %" ]]; then
212212 if [[ " $FILE " =~ $EXCLUDE_SCRIPT_LIST ]]; then
213213 echo " skipping script file for $( ${GP} sed -r ' s/\\//g' <<< $ERRORSMALLCASE ) "
214214 continue
0 commit comments