Parcourir la source

reStructuredText syntax fix for issue #1

Matthew Wang il y a 11 ans
Parent
révision
81d6591e96
1 fichiers modifiés avec 15 ajouts et 3 suppressions
  1. 15
    3
      README.rst

+ 15
- 3
README.rst Voir le fichier

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