feat(clap_complete): Dynamic Completion: Support hiding possible values, flags, and subcommands by default#5283
feat(clap_complete): Dynamic Completion: Support hiding possible values, flags, and subcommands by default#5283siketyan wants to merge 3 commits intoclap-rs:masterfrom
Conversation
Signed-off-by: Natsuki Ikeguchi <me@s6n.jp>
Signed-off-by: Natsuki Ikeguchi <me@s6n.jp>
Signed-off-by: Natsuki Ikeguchi <me@s6n.jp>
|
Thanks for the work on this! There is one point I wasn't clear about in the expectations for this: we should probably keep a completion hidden unless there are no visible choices. In reviewing this, I also noticed
I do find it less than ideal how inconsistent we are with where we check With that said, this is strictly an improvement from where we are at and I'm willing to merge as-is. I would remove the "Closes" so we'd keep that issue open for the rest of this work. Would you prefer me merging this or wrapping up the above? If you do go, I would recommend putting the test fixture changes in their own commits, showing the behavior at the time of that commit, with the feature work done in a follow up commit. This makes it a lot easier to review the tests / behavior change as I can more easily see what behavior changed in the feature commits via the test changes. |
|
@epage Thank you for your review! I prefer continuing this before merging.
Makes sense. I'll do that! |
|
I'm curious, what led you to working on this? |
|
As this is a bit stale, I'm going to go ahead and close this. Thank you for your work! Even if this wasn't merged as-is, it can serve as a starting point for you or someone else to pick back up the work! |
Closes #3951
For example,
--outputis hidden on listing all possible flags...And it is visible when I type
--o.