-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Reworded the explanation about optional command options #5009
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
Conversation
javiereguiluz
commented
Feb 18, 2015
Q | A |
---|---|
Doc fix? | yes |
New docs? | no |
Applies to | 2.3+ |
Fixed tickets | #4110 |
It is also possible to make an option *optionally* accept a value (so that | ||
``--yell``, ``--yell=loud`` or ``--yell loud`` work). Options can also be configured to | ||
accept an array of values. | ||
It may look that it's possible to make an option *optionally* accept a value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the option optionally here sounds very confusing, can it be reworded too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't come up with anything else... (btw, you're back reviewing, awesome!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove it all together and say:
There is nothing forbidding you to create a command with an input option set to
InputOption::OPTIONAL mode. You will just not be able to distinguish when the
flag for that option was used without a value (``command --yell``) or when it was
not used at all (``command``). The value retrieved for the option will be the
same ``null``.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like your explanation ... but I've tweaked some minor parts of it. Thanks.
It is also possible to make an option *optionally* accept a value (so that | ||
``--yell``, ``--yell=loud`` or ``--yell loud`` work). Options can also be configured to | ||
accept an array of values. | ||
There is nothing forbidding you to create a command with an *optional option*, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 on the term "optional option", options are always optional. It's the value we are talking about here
Looks good 👍 |
It is also possible to make an option *optionally* accept a value (so that | ||
``--yell``, ``--yell=loud`` or ``--yell loud`` work). Options can also be configured to | ||
accept an array of values. | ||
There is nothing forbidding you to create a command with an option that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that optionally again 👴, it is okay, i will not fuss again about that. Go ahead 👍
👍 Thanks Javier :) |
…viereguiluz) This PR was merged into the 2.3 branch. Discussion ---------- Reworded the explanation about optional command options | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.3+ | Fixed tickets | #4110 Commits ------- 89029cd Reworded again the note about "optional options" 221597a Reworded the explanation about "optional options" 1b5fcf0 Reworded the explanation about optional command options