[BACK]Return to sdiff.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / sdiff

Annotation of src/usr.bin/sdiff/sdiff.1, Revision 1.4

1.4     ! jmc         1: .\" $OpenBSD: sdiff.1,v 1.3 2005/12/27 04:43:01 tedu Exp $
1.1       tedu        2: .\"
                      3: .\" Written by Raymond Lai <ray@cyth.net>.
                      4: .\" Public domain.
                      5: .\"
                      6: .Dd October 29, 2005
                      7: .Dt SDIFF 1
                      8: .Os
                      9: .Sh NAME
                     10: .Nm sdiff
                     11: .Nd side-by-side diff
                     12: .Sh SYNOPSIS
                     13: .Nm
1.3       tedu       14: .Op Fl abdilstW
1.1       tedu       15: .Op Fl I Ar regexp
                     16: .Op Fl o Ar outfile
                     17: .Op Fl w Ar width
                     18: .Ar file1
                     19: .Ar file2
                     20: .Sh DESCRIPTION
                     21: Shows a side-by-side comparison of two files.
                     22: .Pp
                     23: The options are:
                     24: .Bl -tag -width Ds
                     25: .It Fl l
1.4     ! jmc        26: Only print the left column for identical lines.
1.1       tedu       27: .It Fl o Ar outfile
1.4     ! jmc        28: Interactively merge
1.1       tedu       29: .Ar file1
                     30: and
                     31: .Ar file2
                     32: into
                     33: .Ar outfile .
                     34: In this mode, the user is prompted for each set of differences.
                     35: .Pp
1.4     ! jmc        36: The commands are as follows:
1.1       tedu       37: .Bl -tag -width Ds
                     38: .It Cm l
                     39: Choose left set of diffs.
                     40: .It Cm r
                     41: Choose right set of diffs.
                     42: .It Cm s
                     43: Silent mode \(en identical lines are not printed.
                     44: .It Cm v
                     45: Verbose mode \(en identical lines are printed.
                     46: .It Cm e
                     47: Start editing an empty file, which will be merged into
                     48: .Ar outfile
                     49: upon exiting the editor.
                     50: .It Cm e Cm l
                     51: Start editing file with left set of diffs.
                     52: .It Cm e Cm r
                     53: Start editing file with right set of diffs.
                     54: .It Cm e Cm b
                     55: Start editing file with both sets of diffs.
                     56: .It Cm q
                     57: Quit
                     58: .Nm .
                     59: .El
                     60: .It Fl s
                     61: Skip identical lines.
                     62: .It Fl w Ar width
                     63: Print a maximum of
                     64: .Ar width
                     65: characters on each line.
                     66: The default is 130 characters.
                     67: .El
                     68: .Pp
                     69: Options passed to
                     70: .Xr diff 1
                     71: are:
                     72: .Bl -tag -width Ds
                     73: .It Fl a
                     74: Treat
                     75: .Ar file1
                     76: and
                     77: .Ar file2
                     78: as text files.
                     79: .It Fl b
                     80: Ignore trailing blank spaces.
                     81: .It Fl d
                     82: Minimize diff size.
                     83: .It Fl I Ar regexp
                     84: Ignore line changes matching
                     85: .Ar regexp .
                     86: .It Fl i
                     87: Do a case-insensitive comparison.
                     88: .It Fl t
                     89: Expand tabs to spaces.
                     90: .It Fl W
1.4     ! jmc        91: Ignore all spaces
        !            92: (the
1.1       tedu       93: .Fl w
                     94: flag is passed to
1.4     ! jmc        95: .Xr diff 1 ) .
1.1       tedu       96: .El
1.4     ! jmc        97: .Sh AUTHORS
        !            98: .Nm
        !            99: was written from scratch for the public domain by
        !           100: .An Ray Lai Aq ray@cyth.net .
1.1       tedu      101: .Sh CAVEATS
                    102: Although undocumented,
                    103: .Nm
                    104: supports all options supported by GNU sdiff.
                    105: Some options require GNU diff.
                    106: .Pp
                    107: Tabs are treated as anywhere from one to eight characters wide,
                    108: depending on the current column.
                    109: Terminals that treat tabs as eight characters wide will look best.