Selaa lähdekoodia

Merge pull request #73 from dimonomid/wrap_readme

Update readme with --wrap details
Matt Wang 6 vuotta sitten
vanhempi
commit
7e0cf85d85
No account linked to committer's email
1 muutettua tiedostoa jossa 22 lisäystä ja 19 poistoa
  1. 22
    19
      README.rst

+ 22
- 19
README.rst Näytä tiedosto

@@ -87,13 +87,15 @@ Type ``cdiff -h`` to show usage::
87 87
     and auto pager support
88 88
 
89 89
     Options:
90
-      --version           show program's version number and exit
91
-      -h, --help          show this help message and exit
92
-      -s, --side-by-side  enable side-by-side mode
93
-      -w N, --width=N     set text width for side-by-side mode, 0 for auto
94
-                          detection, default is 80
95
-      -l, --log           show log with changes from revision control
96
-      -c M, --color=M     colorize mode 'auto' (default), 'always', or 'never'
90
+      --version            show program's version number and exit
91
+      -h, --help           show this help message and exit
92
+      -s, --side-by-side   enable side-by-side mode
93
+      -w N, --width=N      set text width for side-by-side mode, 0 for auto
94
+                           detection, default is 80
95
+      -l, --log            show log with changes from revision control
96
+      -c M, --color=M      colorize mode 'auto' (default), 'always', or 'never'
97
+      -t N, --tab-width=N  convert tab characters to this many spaces (default: 8)
98
+      --wrap               wrap long lines in side-by-side view
97 99
 
98 100
       Note:
99 101
         Option parser will stop on first unknown option and pass them down to
@@ -107,15 +109,16 @@ from e.g. ``git diff``, ``svn diff``):
107 109
 .. code-block:: bash
108 110
 
109 111
     cd proj-workspace
110
-    cdiff                       # view colored incremental diff
111
-    cdiff -s                    # view side by side, use default text width 80
112
-    cdiff -s -w 90              # use text width 90 other than default 80
113
-    cdiff -s -w 0               # auto set text width based on terminal size
114
-    cdiff -s file1 dir2         # view modification of given files/dirs only
115
-    cdiff -s -w90 -- -U10       # pass '-U10' to underneath revision diff tool
116
-    cdiff -s -w90 -U10          # '--' is optional as it's unknown to cdiff
117
-    cdiff -s --cached           # show git staged diff (git diff --cached)
118
-    cdiff -s -r1234             # show svn diff to revision 1234
112
+    cdiff                         # view colored incremental diff
113
+    cdiff -s                      # view side by side, use default text width 80
114
+    cdiff -s -w 90                # use text width 90 other than default 80
115
+    cdiff -s -w 0                 # auto set text width based on terminal size
116
+    cdiff -s -w 0 --wrap          # same as before, but also wrap long lines
117
+    cdiff -s file1 dir2           # view modification of given files/dirs only
118
+    cdiff -s -w90 --wrap -- -U10  # pass '-U10' to underneath revision diff tool
119
+    cdiff -s -w90 --wrap -U10     # '--' is optional as it's unknown to cdiff
120
+    cdiff -s --cached             # show git staged diff (git diff --cached)
121
+    cdiff -s -r1234               # show svn diff to revision 1234
119 122
 
120 123
 Read log with changes in a *Git/Mercurial/Svn* workspace (output from e.g.
121 124
 ``git log -p``, ``svn log --diff``), note *--diff* option is new in svn 1.7.0:
@@ -125,7 +128,7 @@ Read log with changes in a *Git/Mercurial/Svn* workspace (output from e.g.
125 128
     cd proj-workspace
126 129
     cdiff -l                    # read log along with changes
127 130
     cdiff -ls                   # equivalent to cdiff -l -s, view side by side
128
-    cdiff -ls -w90              # set text width 90 as well
131
+    cdiff -ls -w90 --wrap       # set text width 90 and enable wrapping as well
129 132
     cdiff -ls file1 dir2        # see log with changes of given files/dirs only
130 133
 
131 134
 Environment variable ``CDIFF_OPTIONS`` may be used to specify default options
@@ -133,8 +136,8 @@ that will be placed at the beginning of the argument list, for example:
133 136
 
134 137
 .. code-block:: bash
135 138
 
136
-    export CDIFF_OPTIONS='-s -w0'
137
-    cdiff foo                   # equivalent to "cdiff -s -w0 foo"
139
+    export CDIFF_OPTIONS='-s -w0 --wrap'
140
+    cdiff foo                   # equivalent to "cdiff -s -w0 --wrap foo"
138 141
 
139 142
 If you feel more comfortable with a command such as ``git cdiff`` to trigger
140 143
 the cdiff command, you may symlink the executable to one named ``git-cdiff``