|
|
|
@ -14,13 +14,13 @@ Usage(){
|
|
|
|
|
Usage: $Progrm [OPTS] [DIR_1 [DIR_2 ...]]
|
|
|
|
|
|
|
|
|
|
-h, --help - Display this help information.
|
|
|
|
|
-C, --no-color - Provide color via esscape sequences.
|
|
|
|
|
-D, --no-subdirs - Ignore the 'sheets/_*' subdirectories.
|
|
|
|
|
-I, --no-lenchk-line - Ignore the special 'lenchk=.*' line.
|
|
|
|
|
-N, --no-preview - Omit the preview of each triggered line.
|
|
|
|
|
-P, --no-pager - Do not use less(1) or more(1) for paging.
|
|
|
|
|
-S, --no-summary - Omit the summary before $Progrm exits.
|
|
|
|
|
-W, --no-whilelist - Do not use the whitelist file.
|
|
|
|
|
-c, --colorize - Provide color via esscape sequences.
|
|
|
|
|
-l, --limit [INT] - Override the limit of 80 columns.
|
|
|
|
|
-w, --wl-file [FILE] - Use an alternative whitelist file.
|
|
|
|
|
|
|
|
|
@ -69,8 +69,8 @@ while [ "$1" ]; do
|
|
|
|
|
NoPager='True' ;;
|
|
|
|
|
--no-preview|-N)
|
|
|
|
|
NoPreview='True' ;;
|
|
|
|
|
--colorize|-c)
|
|
|
|
|
DoColor='True' ;;
|
|
|
|
|
--no-color|-C)
|
|
|
|
|
NoColor='True' ;;
|
|
|
|
|
--no-summary|-S)
|
|
|
|
|
NoSummary='True' ;;
|
|
|
|
|
--no-subdirs|-D)
|
|
|
|
@ -176,9 +176,9 @@ Main(){
|
|
|
|
|
[ "$NoPreview" == 'True' ] || printf '\n'
|
|
|
|
|
|
|
|
|
|
# The filename containing problematic line lengths.
|
|
|
|
|
[ "$DoColor" == 'True' ] && printf "$C_FileNames"
|
|
|
|
|
[ "$NoColor" == 'True' ] || printf "$C_FileNames"
|
|
|
|
|
printf '%s\n' "${File#../}"
|
|
|
|
|
[ "$DoColor" == 'True' ] && printf "$C_Reset"
|
|
|
|
|
[ "$NoColor" == 'True' ] || printf "$C_Reset"
|
|
|
|
|
|
|
|
|
|
HaveBeenHit='True'
|
|
|
|
|
let Hits++
|
|
|
|
@ -186,9 +186,9 @@ Main(){
|
|
|
|
|
|
|
|
|
|
if ! [ "$NoPreview" == 'True' ]; then
|
|
|
|
|
# The line number of the problematic length.
|
|
|
|
|
[ "$DoColor" == 'True' ] && printf "$C_LineNums"
|
|
|
|
|
[ "$NoColor" == 'True' ] || printf "$C_LineNums"
|
|
|
|
|
printf ' %7d ' $LineNum # <-- allows for 9,999,999 lines.
|
|
|
|
|
[ "$DoColor" == 'True' ] && printf "$C_Reset"
|
|
|
|
|
[ "$NoColor" == 'True' ] || printf "$C_Reset"
|
|
|
|
|
|
|
|
|
|
# Cannot make this 80 columns long, due to the indentation
|
|
|
|
|
# and padding, but if you need to test this, for the sake
|
|
|
|
@ -197,9 +197,9 @@ Main(){
|
|
|
|
|
printf '%s' "${REPLY:0:70}"
|
|
|
|
|
|
|
|
|
|
# Cut-off ellipses.
|
|
|
|
|
[ "$DoColor" == 'True' ] && printf "$C_Ellipses"
|
|
|
|
|
[ "$NoColor" == 'True' ] || printf "$C_Ellipses"
|
|
|
|
|
printf '...\n'
|
|
|
|
|
[ "$DoColor" == 'True' ] && printf "$C_Reset"
|
|
|
|
|
[ "$NoColor" == 'True' ] || printf "$C_Reset"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
done < "$File"
|
|
|
|
|