-
Notifications
You must be signed in to change notification settings - Fork 263
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
Add completion on option to the Bash completion code #1374
Comments
The latest cobra release is titled "The completion release". We should look into the improvements and we might get options completion very cheaply. :) |
We should look into kubectl code and how it does the completion, as it also allows completion on option. while we are at that we might already check how kubectl does completion on context-sensitive information, and maybe we can take this over in one hop together with this code (see #1373 for the context-sensitive completion story) |
Also related: #1474 for eve more advanced auto-completion options. |
The options are being completed on their own for subcommands. For example:
Do we want to enhance the existing completion? |
Ah, great. Remember that this didn't work with older cobra versions. I think this should be good enough. |
@dsimansk yes I think we can close this. |
Per the above comments with latest Cobra library version the options are completed as expected. /close |
Feature request
At the moment bash/zsh completion on works on commands names, but not on options. Since we have a tons of options with often lengthy names, it would be very helpful to allow completion on options, too.
Something what kubectl already does:
The implementation of kubectl could act as blueprint here. See also #1042 for a related usability discussion, this feature could be an alternative solution for the usability issue with having long option names.
The text was updated successfully, but these errors were encountered: