aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/diff/diff.1
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2017-04-20 14:22:33 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2017-04-20 14:22:33 +0000
commitfddcb7b82ff45dc9e08bab26bbfe7a2d2e8ca20f (patch)
tree3e485615652828e8d65ef213796a7cc011a0ddf6 /usr.bin/diff/diff.1
parent431bcfcdbde1606906a9c0be6930992e315dee5a (diff)
Implement a basic --changed-group-format
etcupdate(8) requires that option, while GNU diff supports many more variation of that options, their behaviour beside the simple verion implemented here are quite inconsistent as such I do not plan to implement those. The only special keyword supported by this implementation are: %< and %> %= is not implemented as the documentation of GNU diff says: common lines, but it actually when tested print the changes from the first file
Notes
svn path=/head/; revision=317194
Diffstat (limited to 'usr.bin/diff/diff.1')
-rw-r--r--usr.bin/diff/diff.117
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1
index aeb4ee15df1a..a1f3edd1b8c5 100644
--- a/usr.bin/diff/diff.1
+++ b/usr.bin/diff/diff.1
@@ -30,7 +30,7 @@
.\" @(#)diff.1 8.1 (Berkeley) 6/30/93
.\" $FreeBSD$
.\"
-.Dd April 8, 2017
+.Dd April 20, 2017
.Dt DIFF 1
.Os
.Sh NAME
@@ -44,6 +44,7 @@
.Fl n | q | u
.Oc
.Op Fl -brief
+.Op Fl -changed-group-format Ar GFMT
.Op Fl -ed
.Op Fl -expand-tabs
.Op Fl -forward-ed
@@ -70,6 +71,7 @@
.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
.Op Fl L Ar label | Fl -label Ar label
.Op Fl -brief
+.Op Fl -changed-group-format Ar GFMT
.Op Fl -ed
.Op Fl -expand-tabs
.Op Fl -forward-ed
@@ -94,6 +96,7 @@
.Op Fl abdiltw
.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
.Op Fl -brief
+.Op Fl -changed-group-format Ar GFMT
.Op Fl -ed
.Op Fl -expand-tabs
.Op Fl -forward-ed
@@ -119,6 +122,7 @@
.Op Fl I Ar pattern | Fl -ignore-matching-lines Ar pattern
.Op Fl L Ar label | Fl -label Ar label
.Op Fl -brief
+.Op Fl -changed-group-format Ar GFMT
.Op Fl -ed
.Op Fl -expand-tabs
.Op Fl -forward-ed
@@ -146,6 +150,7 @@
.Fl n | q | u
.Oc
.Op Fl -brief
+.Op Fl -changed-group-format Ar GFMT
.Op Fl -context
.Op Fl -ed
.Op Fl -expand-tabs
@@ -355,6 +360,16 @@ E.g.,
.Dq if (\ \&a == b \&)
will compare equal to
.Dq if(a==b) .
+.It Fl -changed-group-format Ar GFMT
+Format input groups in the provided
+.Pp
+the format is a string with special keywords:
+.Bl -tag -width %<
+.It %<
+lines from FILE1
+.It %<
+lines from FILE2
+.El
.El
.Pp
Directory comparison options: