Skip to content

Commit a534b03

Browse files
committed
Prints the diffs in colour in terminal
1 parent 94bb79a commit a534b03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git-diff-blame

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ while (<$diff>) {
6969
}
7070
}
7171
} elsif (m{^ }) {
72-
print " ", get_blame_prefix(scalar <$pre>), "\t", $_;
72+
print " ", get_blame_prefix(scalar <$pre>), "\t", $_;
7373
scalar <$post>; # discard
7474
} elsif (m{^\-}) {
75-
print "- ", get_blame_prefix(scalar <$pre>), "\t", $_;
75+
print "[31m - ", get_blame_prefix(scalar <$pre>), "\t", $_,"[m ";
7676
} elsif (m{^\+}) {
77-
print "+ ", get_blame_prefix(scalar <$post>), "\t", $_;
77+
print "[32m + ", get_blame_prefix(scalar <$post>), "\t", $_,"[m ";
7878
}
7979
}

0 commit comments

Comments
 (0)