@@ -174,9 +174,10 @@ flag:
174
174
1
175
175
);
176
176
177
- Note that while long options are separated from their value with an ``= ``
178
- character, e.g. ``--iterations=5 ``, short options do not use any separator. The
179
- short option variant of the previous example would therefore be ``-i5 ``.
177
+ Note that to comply with the `docopt standard `_, long options can specify their
178
+ values after a white space or an ``= `` sign (e.g. ``--iterations 5 `` or
179
+ ``--iterations=5 ``), but short options can only use white spaces or no
180
+ separation at all (e.g. ``-i 5 `` or ``-i5 ``).
180
181
181
182
There are four option variants you can use:
182
183
@@ -188,8 +189,8 @@ There are four option variants you can use:
188
189
behavior of options;
189
190
190
191
``InputOption::VALUE_REQUIRED ``
191
- This value is required (e.g. ``--iterations=5 `` or ``-i5 ``), the option itself is
192
- still optional;
192
+ This value is required (e.g. ``--iterations=5 `` or ``-i5 ``), the option
193
+ itself is still optional;
193
194
194
195
``InputOption::VALUE_OPTIONAL ``
195
196
This option may or may not have a value (e.g. ``--yell `` or
@@ -225,13 +226,13 @@ values after a white space or an ``=`` sign (e.g. ``--iterations 5`` or
225
226
``--iterations=5 ``), but short options can only use white spaces or no
226
227
separation at all (e.g. ``-i 5 `` or ``-i5 ``).
227
228
228
- .. _ `docopt standard` : http://docopt.org/
229
+ .. caution ::
229
230
230
- .. tip ::
231
-
232
- While it is possible to use whitespace to separate an option from its value,
231
+ While it is possible to separate an option from its value with a white space,
233
232
using this form leads to an ambiguity should the option appear before the
234
- command name. In other words , ``php bin/console --iterations 5 app:greet Fabien ``
233
+ command name. For example , ``php bin/console --iterations 5 app:greet Fabien ``
235
234
is ambiguous; Symfony would interpret ``5 `` as the command name. To avoid
236
235
this situation, always place options after the command name, or avoid using
237
236
a space to separate the option name from its value.
237
+
238
+ .. _`docopt standard` : http://docopt.org/
0 commit comments