-
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
Add Aliases completions on ZSH #1014
Conversation
Signed-off-by: Chmouel Boudjnah <chmouel@chmouel.com>
This will add ZSH aliases support pulled from my fork (and submitted upstream at spf13/cobra#1014) and update to the latest pflags and cobra support. Fixes tektoncd#317
This will add ZSH aliases support pulled from my fork (and submitted upstream at spf13/cobra#1014) and update to the latest pflags and cobra support. Fixes #317
This PR is being marked as stale due to a long period of inactivity |
It's not stalled fyi, just nobody wants to merge this 😭 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jharshman
Ideally, would like to see some negative test cases ...
Otherwise this
LGTM
@@ -7,6 +7,38 @@ import ( | |||
"testing" | |||
) | |||
|
|||
func TestGenZshAliases(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chmouel excellent job on this PR.
I'd be curious to see some negative test cases (ie. no aliases, empty aliases array, etc)
Bash completion does not complete command aliases. Also, be aware that the current zsh script may get replaced by #1070 |
The zsh completion script has been completely changed by #1070 so this PR no longer applies. @chmouel Note that Cobra's shell completion, including the new zsh logic, does not complete aliases. This seems to be done by design. If you feel aliases should be completed, I recommended opening new PR and arguing the value for it. @jpmcb I believe we can close this one now that #1070 has been merged. |
Thanks for letting me know @marckhouzam!! Glad we are getting some things cleaned up @chmouel thank you so much for the contributions and PRs, apologies for not being able to get them in before the zsh revamp. |
@marckhouzam why would you assume this is "by design" ? |
@chmouel You are right, I don't actually have a confirmation it was by design. Personally I feel command aliases should be completed somehow, either fully like you suggest or only when there are no other completions, as is done for argument aliases. Not sure which is best. I encourage you to post a PR (since this one was no longer applicable). |
This add ZSH completion on command aliases