-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Powershell completion alias handling #2049
base: main
Are you sure you want to change the base?
Conversation
Thanks @bartoncasey. |
Oh, no. I should have done a better job of looking for existing PRs. It looks like #1977 is assuming that you will always alias things using the absolute path of the executable:
vs what I think is the more convential form of
Mine looks for aliases of the latter form. |
Incorporate @bartoncasey insight about typical alias usage in spf13#2049
I've tested this PR and although it is working very nicely for normal aliases, I don't believe it works for the above form. So now I'm going back and forth between this PR and #1977 hoping to find the sweet spot. |
After spending quite a bit of time trying things out, I think this solution is the simplest and I believe can be made to cover every case. I was thinking of these cases:
I think we can achieve this with a slight modification do have instead:
This translates to something like @bartoncasey What do you think? |
Currently the Powershell completion generator registers the completion for the default command name. Any aliases of the command will not have completion enabled. (e.g.
k -> kubectl
)This change will include code to register the completer for all current aliases of the command in addition to the command itself.