Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Console] Add completion values to input definition#44948
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
Uh oh!
There was an error while loading.Please reload this page.
8650876 todfb4cc6CompareUh oh!
There was an error while loading.Please reload this page.
wouterj commentedJan 7, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I haven't looked at the code yet, but I really like the idea. See also these 2 comments on the original PR:#42251 Being able to predict whether an option has a value or not and maybe even dumping the static values to the completion file (e.g. for apps like Composer) are 2 other very interesting advantages of this approach. Fromhttps://github.com/posener/complete , mentioned in the comments I referenced above, I especially like the Predict enum: Set: values are static, can be dumped (or described) We can even extend this with e.g. Files, to enable the great file completion system of shell completion. |
0f93398 tof8e03dbCompareGromNaN commentedJan 10, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
After you comment@wouterj, I think we can use a union type that covers each cases.
We must stay open to file completion once we'd have managed to get it work#43607. |
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.
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.
Uh oh!
There was an error while loading.Please reload this page.
f8e03db toc4d65b3CompareUh 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.
c4d65b3 toab40533CompareUh 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.
Uh oh!
There was an error while loading.Please reload this page.
e668ed4 to0e31423CompareUh 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.
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.
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.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
d1a2af5 to80654e5Compare
nicolas-grekas 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.
Much better :)
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
80654e5 to5d70c9bCompareGromNaN commentedFeb 15, 2022
Thank you for all your time for this review. We have something very clear now. |
Uh oh!
There was an error while loading.Please reload this page.
091027a to4f9c779CompareGromNaN commentedMar 16, 2022
chalasr 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.
Great. Just one minor question
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas 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.
Some last minute nitpicking;
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.
Uh oh!
There was an error while loading.Please reload this page.
ae8e882 toa2a2e67CompareUh oh!
There was an error while loading.Please reload this page.
a2a2e67 to95ad05fComparenicolas-grekas commentedMar 17, 2022
What about this todo?
|
GromNaN commentedMar 17, 2022
Could be part of an other PR. |
95ad05f to9951124Compare
Uh oh!
There was an error while loading.Please reload this page.
During implementation of bash completion to core commands, I found the code quite verbose. The completion for all options and arguments are mixed into the same method.
Example of current code
symfony/src/Symfony/Component/Console/Command/HelpCommand.php
Lines 85 to 98 in098ff62
Command::completethat uses this values.In the constructor of the
InputOptionandInputArgumentclasses:symfony/src/Symfony/Component/Console/Command/HelpCommand.php
Lines 40 to 45 in091027a
Or using
Command::addOptionandCommand::addArgument:symfony/src/Symfony/Component/Console/Command/DumpCompletionCommand.php
Line 78 in091027a
Additional benefits:
Todo: