@@ -180,13 +180,13 @@ for I in $(seq -f '%02g' 0 $(($SPLIT-1)) ) ; do
180
180
# also make error small case and escape special chars: () |
181
181
ERRORSMALLCASE=$( echo ${ERRORNOCOLOR,,} | ${GP} sed -r ' s/\(/\\(/g' | ${GP} sed -r ' s/\)/\\)/g' | ${GP} sed -r ' s/\|/\\|/g' )
182
182
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
184
184
PREVCHAR=${ERROR:: 1}
185
185
# remove first character
186
186
ERRORSMALLCASE=${ERRORSMALLCASE# ?}
187
187
ERROR=${ERROR# ?}
188
188
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
190
190
NEXTCHAR=${ERROR: ${# ERROR} -1: 1}
191
191
# remove last character
192
192
ERRORSMALLCASE=${ERRORSMALLCASE::- 1}
@@ -196,9 +196,9 @@ for I in $(seq -f '%02g' 0 $(($SPLIT-1)) ) ; do
196
196
ERRORSMALLCASE=$( ${GP} sed -r ' s/\./\\./g' <<< $ERRORSMALLCASE )
197
197
198
198
# 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)
200
200
# 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
202
202
if [[ " $FILE " =~ $EXCLUDE_SCRIPT_LIST ]]; then
203
203
echo " skipping script file for $( ${GP} sed -r ' s/\\//g' <<< $ERRORSMALLCASE ) "
204
204
continue
@@ -208,7 +208,7 @@ for I in $(seq -f '%02g' 0 $(($SPLIT-1)) ) ; do
208
208
if [[ -z " $CORRECTION " ]]; then
209
209
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 )
210
210
# 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
212
212
if [[ " $FILE " =~ $EXCLUDE_SCRIPT_LIST ]]; then
213
213
echo " skipping script file for $( ${GP} sed -r ' s/\\//g' <<< $ERRORSMALLCASE ) "
214
214
continue
0 commit comments