Annotation of src/usr.bin/sdiff/sdiff.1, Revision 1.6
1.6 ! jmc 1: .\" $OpenBSD: sdiff.1,v 1.5 2005/12/27 12:45:57 jmc 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.
1.6 ! jmc 35: See
! 36: .Ev EDITOR
! 37: and
! 38: .Ev VISUAL ,
! 39: below,
! 40: for details of which editor, if any, is invoked.
1.1 tedu 41: .Pp
1.4 jmc 42: The commands are as follows:
1.1 tedu 43: .Bl -tag -width Ds
44: .It Cm l
45: Choose left set of diffs.
46: .It Cm r
47: Choose right set of diffs.
48: .It Cm s
49: Silent mode \(en identical lines are not printed.
50: .It Cm v
51: Verbose mode \(en identical lines are printed.
52: .It Cm e
53: Start editing an empty file, which will be merged into
54: .Ar outfile
55: upon exiting the editor.
56: .It Cm e Cm l
57: Start editing file with left set of diffs.
58: .It Cm e Cm r
59: Start editing file with right set of diffs.
60: .It Cm e Cm b
61: Start editing file with both sets of diffs.
62: .It Cm q
63: Quit
64: .Nm .
65: .El
66: .It Fl s
67: Skip identical lines.
68: .It Fl w Ar width
69: Print a maximum of
70: .Ar width
71: characters on each line.
72: The default is 130 characters.
73: .El
74: .Pp
75: Options passed to
76: .Xr diff 1
77: are:
78: .Bl -tag -width Ds
79: .It Fl a
80: Treat
81: .Ar file1
82: and
83: .Ar file2
84: as text files.
85: .It Fl b
86: Ignore trailing blank spaces.
87: .It Fl d
88: Minimize diff size.
89: .It Fl I Ar regexp
90: Ignore line changes matching
91: .Ar regexp .
92: .It Fl i
93: Do a case-insensitive comparison.
94: .It Fl t
95: Expand tabs to spaces.
96: .It Fl W
1.4 jmc 97: Ignore all spaces
98: (the
1.1 tedu 99: .Fl w
100: flag is passed to
1.4 jmc 101: .Xr diff 1 ) .
1.1 tedu 102: .El
1.6 ! jmc 103: .Sh ENVIRONMENT
! 104: .Bl -tag -width Ds
! 105: .It Ev EDITOR , VISUAL
! 106: Specifies an editor to use with the
! 107: .Fl o
! 108: option.
! 109: If both
! 110: .Ev EDITOR
! 111: and
! 112: .Ev VISUAL
! 113: are set,
! 114: .Ev VISUAL
! 115: takes precedence.
! 116: If neither
! 117: .Ev EDITOR
! 118: nor
! 119: .Ev VISUAL
! 120: are set,
! 121: the default is
! 122: .Xr vi 1 .
! 123: .El
1.5 jmc 124: .Sh SEE ALSO
125: .Xr diff 1 ,
1.6 ! jmc 126: .Xr diff3 1 ,
! 127: .Xr vi 1
1.4 jmc 128: .Sh AUTHORS
129: .Nm
130: was written from scratch for the public domain by
131: .An Ray Lai Aq ray@cyth.net .
1.1 tedu 132: .Sh CAVEATS
133: Although undocumented,
134: .Nm
135: supports all options supported by GNU sdiff.
136: Some options require GNU diff.
137: .Pp
138: Tabs are treated as anywhere from one to eight characters wide,
139: depending on the current column.
140: Terminals that treat tabs as eight characters wide will look best.