diff options
-rw-r--r-- | textproc/cdiff/Makefile | 2 | ||||
-rw-r--r-- | textproc/cdiff/src/cdiff.1 | 6 | ||||
-rw-r--r-- | textproc/cdiff/src/cdiff.sh | 7 |
3 files changed, 12 insertions, 3 deletions
diff --git a/textproc/cdiff/Makefile b/textproc/cdiff/Makefile index f519fe0..ec80ff9 100644 --- a/textproc/cdiff/Makefile +++ b/textproc/cdiff/Makefile @@ -8,7 +8,7 @@ # PORTNAME= cdiff -PORTVERSION= 1.3 +PORTVERSION= 1.4 CATEGORIES= textproc MASTER_SITES= # none DISTFILES= # none diff --git a/textproc/cdiff/src/cdiff.1 b/textproc/cdiff/src/cdiff.1 index eaa617a..551928a 100644 --- a/textproc/cdiff/src/cdiff.1 +++ b/textproc/cdiff/src/cdiff.1 @@ -42,6 +42,7 @@ files and URLs, adds color codes, expands tabs to 8 spaces, and passes the results to .Xr less 1 . If used on a color terminal, it makes diffs much easier to read. +There is also handling of "cvs annotate" in it. .Sh AUTHORS .Nm was written by @@ -50,13 +51,14 @@ based on a sed line somebody passed around. The code is (much) smaller than this man page. .Sh SEE ALSO .Xr diff 1 , -.Xr less 1 . +.Xr less 1 , +.Xr cvs 1 . .Sh BUGS .Nm assumes standard ANSI color escape sequences (as used by xterm and most other commonly used terminals), rather than using .Xr curses 3 . - +.Pp .Nm should really be a large and complex C program based on .Xr less 1 diff --git a/textproc/cdiff/src/cdiff.sh b/textproc/cdiff/src/cdiff.sh index 097af55..3823d3b 100644 --- a/textproc/cdiff/src/cdiff.sh +++ b/textproc/cdiff/src/cdiff.sh @@ -22,4 +22,11 @@ s/^(\*\*\* \d+,\d+ *\*\*\*.*)$/\033[1m$1\033[m/o; s/^(\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*)$/\033[1m$1\033[m/o; s/^(!.*)$/\033[35m$1\033[m/o; s/^(@@.*$)/\033[1m$1\033[m/o; +if (/^1.(\d+)(\s+\(\w+\s+\d{2}-\w{3}-\d{2}\):\s)(.*)/) { + $lastcol = $lastcol || 0; + $lastcol++ if defined($lastrev) && $lastrev != $1; + $lastrev = $1; + $lastcol %= 6; + $_ = "\033[3" . ($lastcol + 1) . "m1.$1$2\033[m$3\n"; +} ' | less -R |