-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[WCM] Question Helper - Showing the default answer #4254
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
[WCM] Question Helper - Showing the default answer #4254
Conversation
@@ -62,6 +62,23 @@ some name which will be returned by the | |||
:method:`Symfony\\Component\\Console\\Helper\\QuestionHelper::ask` method. | |||
If they leave it empty, the default value (``AcmeDemoBundle`` here) is returned. | |||
|
|||
Showing the default answer |
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.
This should be "Showing the Default Answer" (only closed class words are not capititalized in our headlines)
Thanks for highlighting these issues. They have been fixed in 87259b6 |
@@ -62,6 +62,23 @@ some name which will be returned by the | |||
:method:`Symfony\\Component\\Console\\Helper\\QuestionHelper::ask` method. | |||
If they leave it empty, the default value (``AcmeDemoBundle`` here) is returned. | |||
|
|||
Showing the Default Answer | |||
.......................... |
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.
You should use ~ characters as the underline character.
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.
Fixed in commit de7691e
By the way, the target version of this would be 2.6 instead of 2.5. |
Updated target version |
|
||
Sometimes, it is beneficial for the user to be aware of the default answer should | ||
they decide not to give one. If you want the user to know, you can add this to your | ||
command:: |
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 think we should reword this a bit to something like this:
Sometimes you want to present the default answer to the user that will be
chosen if they don't provide an answer themself. Use the
:method:`Symfony\\Component\\Console\\Question\\Question::setDefault` method
to show the default answer::
What do you think?
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 agree that this reads better, though the incorrect method is referenced and it would be "themselves" instead of "themself". It would read as follows:
Sometimes you want to present the default answer to the user that will be
chosen if they don't provide an answer themselves. Use the
:method:`Symfony\\Component\\Console\\Question\\Question::setShowDefault` method
to show the default answer::
Let me know and i'll commit this.
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 agree with the change to the method names. Thanks for catching this. Though "themself" is correct. It's the gender neutral form of himself/herself. "Therselves" is plural not singular.
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.
Thanks for explaining. I've committed this with "themself".
👍 I like it the way it is now! |
This is the documentation for a new feature that I am proposing.