Skip to content

Commit f4b77be

Browse files
greg-1-andersonjaviereguiluz
authored andcommitted
Clarify how to use short options with values.
Adds a brief description of the correct syntax for short options that take values.
1 parent 60e0138 commit f4b77be

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

console/input.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ flag:
174174
1
175175
);
176176

177+
Note that while long options are separated from their value with an ``=`` character, e.g. ``--iterations=5``, short options do not use any separator. The short option variant of the previous example would therefore be ``-i5``.
178+
177179
There are four option variants you can use:
178180

179181
``InputOption::VALUE_IS_ARRAY``
@@ -184,7 +186,7 @@ There are four option variants you can use:
184186
behavior of options;
185187

186188
``InputOption::VALUE_REQUIRED``
187-
This value is required (e.g. ``--iterations=5``), the option itself is
189+
This value is required (e.g. ``--iterations=5`` or ``-i5``), the option itself is
188190
still optional;
189191

190192
``InputOption::VALUE_OPTIONAL``

0 commit comments

Comments
 (0)