-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Command aliases are not tab-completed #1852
Comments
When completing a subcommand, also take its aliases into consideration instead of only its name. fixes spf13#1852
The Cobra project currently lacks enough contributors to adequately respond to all issues. This bot triages issues and PRs according to the following rules:
|
I strongly disagree with this. I don't want completion to highlight aliases and shortcuts. If this change is ever considered, please make it configurable. |
Say you have some command
Then completing
ct
will not work:I think the issue is this, though I have not debugged into it, it's just by reading the code:
This code path does not take the command's aliases into account.
This appears to be a duplicate of #1296, which has been closed with a reference to some discussion that seems inconclusive to me. I can't think of any reason not to tab-complete aliases, because they are most useful in interactive sessions, i.e., exactly in the situations where a user would want tab-completions to work.
The text was updated successfully, but these errors were encountered: