diff options
author | 2004-06-20 18:47:45 +0000 | |
---|---|---|
committer | 2004-06-20 18:47:45 +0000 | |
commit | ccd55a2c66ccad56efb56a57f629414c2b2ba510 (patch) | |
tree | 67ad7f49a9556e8c7e07c595bc6dd5cef6f7777b /usr.bin/diff/diff.1 | |
parent | at least somewhat consistently name the TAILQ_ENTRYs... this confused me (diff) | |
download | wireguard-openbsd-ccd55a2c66ccad56efb56a57f629414c2b2ba510.tar.xz wireguard-openbsd-ccd55a2c66ccad56efb56a57f629414c2b2ba510.zip |
Implement -I option: ignore changes matching a set of regexes. From
Jared Yanovich, with twists from millert@ and me. Testing by brad@,
sturm@ and pval@. ok millert@
Diffstat (limited to 'usr.bin/diff/diff.1')
-rw-r--r-- | usr.bin/diff/diff.1 | 49 |
1 files changed, 35 insertions, 14 deletions
diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1 index 633c2f435c0..48668dfd229 100644 --- a/usr.bin/diff/diff.1 +++ b/usr.bin/diff/diff.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: diff.1,v 1.25 2004/03/16 00:40:34 millert Exp $ +.\" $OpenBSD: diff.1,v 1.26 2004/06/20 18:47:45 otto Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -38,31 +38,36 @@ .Sh SYNOPSIS .Nm diff .Op Fl abdilpqtTw +.Op Fl I Ar pattern .Oo -.Fl c | Fl e | Fl f | -.Fl n | Fl u +.Fl c | e | f | +.Fl n | u .Oc .Op Fl L Ar label .Ar file1 file2 .Nm diff .Op Fl abdilpqtTw +.Op Fl I Ar pattern .Op Fl L Ar label .Fl C Ar number .Ar file1 file2 .Nm diff .Op Fl abdilqtw +.Op Fl I Ar pattern .Fl D Ar string .Ar file1 file2 .Nm diff .Op Fl abdilpqtTw +.Op Fl I Ar pattern .Op Fl L Ar label .Fl U Ar number .Ar file1 file2 .Nm diff .Op Fl abdilNPpqtTw +.Op Fl I Ar pattern .Oo -.Fl c | Fl e | Fl f | -.Fl n | Fl u +.Fl c | e | f | +.Fl n | u .Oc .Bk -words .Op Fl L Ar label @@ -93,11 +98,12 @@ With the output format is modified slightly: the output begins with identification of the files involved and their creation dates and then each change is separated -by a line with fifteen *'s. +by a line with fifteen +.Li * Ns 's . The lines removed from .Ar file1 are marked with -.Sq \-\ \& ; +.Sq \&-\ \& ; those added to .Ar file2 are marked @@ -179,7 +185,8 @@ lines of context. Comparison options: .Bl -tag -width Ds .It Fl a -Treat all files as ASCII. +Treat all files as +.Tn ASCII . .It Fl b Causes trailing blanks (spaces and tabs) to be ignored, and other strings of blanks to compare equal. @@ -187,6 +194,18 @@ strings of blanks to compare equal. Try very hard to produce a diff as small as possible. This may consume a lot of processing power and memory when processing large files with many changes. +.It Fl I Ar pattern +Ignores changes, insertions, and deletions whose lines match the +extended regular expression +.Ar pattern . +Multiple +.Fl I +patterns may be specified. +All lines in the change must match some pattern for the change to be +ignored. +See +.Xr re_format 7 +for more information on regular expression patterns. .It Fl i Ignores the case of letters. E.g., @@ -285,8 +304,9 @@ Binary files which differ, common subdirectories, and files which appear in only one directory are described as such. In directory mode only regular files and directories are compared. -If a non-regular file such as a device special file or FIFO is -encountered, a diagnostic message is printed. +If a non-regular file such as a device special file or +.Tn FIFO +is encountered, a diagnostic message is printed. .Pp If only one of .Ar file1 @@ -372,11 +392,11 @@ Replace the range of specified lines with the line .Va ZZ . .It Li XX,YY Ns Ic c Ns Li ZZ,QQ Replace the range -.Va XX , Ns YY +.Va XX , Ns Va YY from .Ar file1 with the range -.Va ZZ , Ns QQ +.Va ZZ , Ns Va QQ from .Ar file2 . .El @@ -418,7 +438,7 @@ as the temporary directory. .El .Sh FILES .Bl -tag -width /tmp/diff.XXXXXXXX -compact -.It Pa /tmp/diff.XXXXXXXX +.It Pa /tmp/diff. Ns Ar XXXXXXXX Temporary file used when comparing a device or the standard input. Note that the temporary file is unlinked as soon as it is created so it will not show up in a directory listing. @@ -442,7 +462,8 @@ An error occurred. .Xr diff3 1 , .Xr ed 1 , .Xr pr 1 , -.Xr fnmatch 3 +.Xr fnmatch 3 , +.Xr re_format 7 .Sh STANDARDS The .Nm |