@@ -49,18 +49,18 @@ is required. It can be separated from the option name either by spaces or
49
49
except that it doesn't require a value. Have a look at the following table
50
50
to get an overview of the possible ways to pass options:
51
51
52
- ===================== ========= =========== ============
53
- Input ``foo `` ``bar `` ``cat ``
54
- ===================== ========= =========== ============
55
- ``--bar=Hello `` ``false `` ``"Hello" `` ``null ``
56
- ``--bar Hello `` ``false `` ``"Hello" `` ``null ``
57
- ``-b=Hello `` ``false `` ``"Hello" `` ``null ``
58
- ``-b Hello `` ``false `` ``"Hello" `` ``null ``
59
- ``-bHello `` ``false `` ``"Hello" `` ``null ``
60
- ``-fcWorld -b Hello `` ``true `` ``"Hello" `` ``"World" ``
61
- ``-cfWorld -b Hello `` ``false `` ``"Hello" `` ``"fWorld" ``
62
- ``-cbWorld `` ``false `` ``null `` ``"bWorld" ``
63
- ===================== ========= =========== ============
52
+ ===================== ========= ============ ============
53
+ Input ``foo `` ``bar `` ``cat ``
54
+ ===================== ========= ============ ============
55
+ ``--bar=Hello `` ``false `` ``"Hello" `` ``null ``
56
+ ``--bar Hello `` ``false `` ``"Hello" `` ``null ``
57
+ ``-b=Hello `` ``false `` ``"= Hello" `` ``null ``
58
+ ``-b Hello `` ``false `` ``"Hello" `` ``null ``
59
+ ``-bHello `` ``false `` ``"Hello" `` ``null ``
60
+ ``-fcWorld -b Hello `` ``true `` ``"Hello" `` ``"World" ``
61
+ ``-cfWorld -b Hello `` ``false `` ``"Hello" `` ``"fWorld" ``
62
+ ``-cbWorld `` ``false `` ``null `` ``"bWorld" ``
63
+ ===================== ========= ============ ============
64
64
65
65
Things get a little bit more tricky when the command also accepts an optional
66
66
argument::
@@ -77,15 +77,15 @@ arguments. Have a look at the fifth example in the following table where it
77
77
is used to tell the command that ``World `` is the value for ``arg `` and not
78
78
the value of the optional ``cat `` option:
79
79
80
- ============================== ================= =========== ===========
81
- Input ``bar `` ``cat `` ``arg ``
82
- ============================== ================= =========== ===========
83
- ``--bar Hello `` ``"Hello" `` ``null `` ``null ``
84
- ``--bar Hello World `` ``"Hello" `` ``null `` ``"World" ``
85
- ``--bar "Hello World" `` ``"Hello World" `` ``null `` ``null ``
86
- ``--bar Hello --cat World `` ``"Hello" `` ``"World" `` ``null ``
87
- ``--bar Hello --cat -- World `` ``"Hello" `` ``null `` ``"World" ``
88
- ``-b Hello -c World `` ``"Hello" `` ``"World" `` ``null ``
89
- ============================== ================= =========== ===========
80
+ ============================== ================= =========== ===========
81
+ Input ``bar `` ``cat `` ``arg ``
82
+ ============================== ================= =========== ===========
83
+ ``--bar Hello `` ``"Hello" `` ``null `` ``null ``
84
+ ``--bar Hello World `` ``"Hello" `` ``null `` ``"World" ``
85
+ ``--bar "Hello World" `` ``"Hello World" `` ``null `` ``null ``
86
+ ``--bar Hello --cat World `` ``"Hello" `` ``"World" `` ``null ``
87
+ ``--bar Hello --cat -- World `` ``"Hello" `` ``null `` ``"World" ``
88
+ ``-b Hello -c World `` ``"Hello" `` ``"World" `` ``null ``
89
+ ============================== ================= =========== ===========
90
90
91
91
.. _docopt : http://docopt.org/
0 commit comments