-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Show completions for args with declared choices #1532
Comments
Sorry for the delay - I think your proposed code is simple enough to include it before #74, and yay for more discoverability! I think |
Yeah, that's part of the plan. I was thinking there'd be more flags with choices, but I guess not. I'd just been working with |
Yep, I already had that in mind in #32 some while ago 😆 I think that'll be a lot harder, because at that point you need composable completions (since for every command, you can have either the completion for the argument, or flags), which basically is the goal of #74. FWIW I'd also prefer minimal pull requests, makes things easier to review - so if you have something which seems ready and finished enough, feel free to open a PR and then another one when you improve things! Also, would you be interested in working on that completion revamping (#74)? I don't really have a master plan in mind for that one, and it's unlikely I'll work on anything completion related in the near future - but at the same time I think it's a very important step towards getting more completions. If you think that'd be something you'd like to work on, would you mind joining the IRC channel to talk about the details? |
Sounds good to me, I'm willing to try revamping completions. I'll jump on IRC, and we can talk about it some time. |
I added this to #32 to keep all completion ideas in one place. |
Now that
cmdutils.argument
is being used (c33f0c3), there's some potential for expanding completions for commands.After inputting
--someflag
or--someflag=
in the command bar, we could show completions if that flag haschoices
.I threw together a really rough proof-of-concept in 6b2fb66
The text was updated successfully, but these errors were encountered: