Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[Console] Document console completion#16723
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
javiereguiluz left a comment
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.
Wouter, thanks for adding the docs of this lovely feature!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
GromNaN commentedApr 21, 2022
Thank you@wouterj. Do you think this page should be updated for 6.1 with the new features: fish completionsymfony/symfony#43641 and configuration in option/argument définitionsymfony/symfony#44948 |
| // complete the input with "Fa" as input | ||
| $suggestions = $tester->complete(['Fa']); | ||
| $this->assertSame(['Fabien', 'Fabrice'], $suggestions); |
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.
Users will think they need to filter the values themself, while this is done by the completion tool.
I thinkgetCompletionValue usage is rare and reserved to cases when the list of values is too long (like the list of all packages on packagistcomposer/composer#10320 (comment))
wouterj commentedApr 21, 2022
Yes, see#16724 (would be great to get your review there) |
Fixes#15947
I couldn't resist rewriting the Console document a bit, to structure it more like "Usage" and "Implementing a custom command". This created a nice place to talk about setting up completion.