Fix hldiff regex for short stats
This commit is contained in:
parent
a6787fa5d1
commit
6b7da37235
2 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env -S awk -f
|
#!/usr/bin/env -S awk -f
|
||||||
|
# vim: set ft=awk :
|
||||||
BEGIN {
|
BEGIN {
|
||||||
bright = "\x1B[1m"
|
bright = "\x1B[1m"
|
||||||
red = "\x1B[31m"
|
red = "\x1B[31m"
|
||||||
|
@ -13,7 +14,7 @@ BEGIN {
|
||||||
if ($0 ~ /^diff /) {
|
if ($0 ~ /^diff /) {
|
||||||
hit_diff = 1;
|
hit_diff = 1;
|
||||||
print bright $0 reset
|
print bright $0 reset
|
||||||
} else if ($0 ~ /^ .*\|.*(\+|-)/) {
|
} else if ($0 ~ /^.*\|.*(\+|-)/) {
|
||||||
left = substr($0, 0, index($0, "|")-1)
|
left = substr($0, 0, index($0, "|")-1)
|
||||||
right = substr($0, index($0, "|"))
|
right = substr($0, index($0, "|"))
|
||||||
gsub(/-+/, red "&" reset, right)
|
gsub(/-+/, red "&" reset, right)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env -S awk -f
|
#!/usr/bin/env -S awk -f
|
||||||
|
# vim: set ft=awk :
|
||||||
BEGIN {
|
BEGIN {
|
||||||
dim = "\x1B[2m"
|
dim = "\x1B[2m"
|
||||||
cyan = "\x1B[36m"
|
cyan = "\x1B[36m"
|
||||||
|
|
Loading…
Reference in a new issue