Skip to content

Clarify how to use short options with values. #9387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion console/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ flag:
1
);

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``.

There are four option variants you can use:

``InputOption::VALUE_IS_ARRAY``
Expand All @@ -184,7 +188,7 @@ There are four option variants you can use:
behavior of options;

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

``InputOption::VALUE_OPTIONAL``
Expand Down