aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/hldiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-06-07 19:08:17 -0400
committerDrew DeVault <sir@cmpwn.com>2019-06-07 19:08:17 -0400
commit6b7da37235092f2500de8354030b58d0cc7a25ef (patch)
tree1c3d181e840fd0457c8c03c4b32deeaaf0e411fd /contrib/hldiff
parenta6787fa5d1e0f88b35c981593da0190ef3a0b27f (diff)
downloadaerc-6b7da37235092f2500de8354030b58d0cc7a25ef.tar.gz
Fix hldiff regex for short stats
Diffstat (limited to 'contrib/hldiff')
-rwxr-xr-xcontrib/hldiff3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/hldiff b/contrib/hldiff
index 89aa9a21..5d7c4228 100755
--- a/contrib/hldiff
+++ b/contrib/hldiff
@@ -1,4 +1,5 @@
#!/usr/bin/env -S awk -f
+# vim: set ft=awk :
BEGIN {
bright = "\x1B[1m"
red = "\x1B[31m"
@@ -13,7 +14,7 @@ BEGIN {
if ($0 ~ /^diff /) {
hit_diff = 1;
print bright $0 reset
- } else if ($0 ~ /^ .*\|.*(\+|-)/) {
+ } else if ($0 ~ /^.*\|.*(\+|-)/) {
left = substr($0, 0, index($0, "|")-1)
right = substr($0, index($0, "|"))
gsub(/-+/, red "&" reset, right)