Browse Source

reStructuredText syntax fix for issue #1

Matthew Wang 11 years ago
parent
commit
81d6591e96
1 changed files with 15 additions and 3 deletions
  1. 15
    3
      README.rst

+ 15
- 3
README.rst View File

@@ -4,10 +4,10 @@ Cdiff
4 4
 View **colored**, **incremental** diff in unified format or **side by side**
5 5
 with **auto pager**.  Requires python (>= 2.5.0) and ``less``.
6 6
 
7
-.. image: http://ymattw.github.com/cdiff/img/default.png
7
+.. image:: http://ymattw.github.com/cdiff/img/default.png
8 8
    :alt: default
9 9
 
10
-.. image: http://ymattw.github.com/cdiff/img/side-by-side.png
10
+.. image:: http://ymattw.github.com/cdiff/img/side-by-side.png
11 11
    :alt: side by side
12 12
 
13 13
 Installation
@@ -22,6 +22,8 @@ Save `src/cdiff.py <https://raw.github.com/ymattw/cdiff/master/src/cdiff.py>` to
22 22
 whatever directory which is in your ``$PATH``, for example, ``$HOME/bin`` is in
23 23
 my ``$PATH``, so I save the script there and name as ``cdiff``.
24 24
 
25
+.. code:: shell
26
+
25 27
     curl -ksS https://raw.github.com/ymattw/cdiff/master/src/cdiff.py > ~/bin/cdiff
26 28
     chmod +x ~/bin/cdiff
27 29
 
@@ -30,6 +32,8 @@ my ``$PATH``, so I save the script there and name as ``cdiff``.
30 32
 You can run the setup.py from the source to install ``cdiff`` to system wide
31 33
 directory.
32 34
 
35
+.. code:: shell
36
+
33 37
     git clone https://github.com/ymattw/cdiff.git
34 38
     cd cdiff
35 39
     sudo ./setup.py install
@@ -44,18 +48,22 @@ diff produced by revision tool if in a git/svn/hg workspace.  Use option ``-s``
44 48
 to enable side by side view, and option ``-w N`` to set a text width other than
45 49
 default ``80``.  See examples below.
46 50
 
47
-Show usage:
51
+Show usage::
48 52
 
49 53
     cdiff -h
50 54
 
51 55
 View a diff (patch) file:
52 56
 
57
+.. code:: shell
58
+
53 59
     cdiff foo.patch             # view colored incremental udiff
54 60
     cdiff foo.patch -s          # view side by side
55 61
     cdiff foo.patch -s -w 90    # use text width 90 other than default 80
56 62
 
57 63
 Read diff from local modification in a svn, git, or hg workspace:
58 64
 
65
+.. code:: shell
66
+
59 67
     cd proj-workspace
60 68
     cdiff
61 69
     cdiff -s
@@ -63,12 +71,16 @@ Read diff from local modification in a svn, git, or hg workspace:
63 71
 
64 72
 Pipe in a diff:
65 73
 
74
+.. code:: shell
75
+
66 76
     svn diff -r PREV | cdiff -s
67 77
     git log -p -2 | cdiff -s
68 78
     git show <commit> | cdiff -s
69 79
 
70 80
 Redirect output to another patch file is safe:
71 81
 
82
+.. code:: shell
83
+
72 84
     svn diff | cdiff -s > my.patch
73 85
 
74 86
 Known issue