-
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
zsh: added custom completions #884
Conversation
d7d579c
to
4d1820b
Compare
We use a forked version of cobra on `github.com/chmouel/cobra@zsh-completion-fixes` which includes two patches that hasn't been merged : spf13/cobra#884 spf13/cobra#899 hopefully this won't needed when those issues gets merged. Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
We use a forked version of cobra on `github.com/chmouel/cobra@zsh-completion-fixes` which includes two patches that hasn't been merged : spf13/cobra#884 spf13/cobra#899 hopefully this won't needed when those issues gets merged. Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
@spf13 @jharshman @BoGeM We've been using these changes over in https://github.com/zaquestion/lab for some time and they've been working as expected. Could we get some fresh eyes on this and hopefully merge. This will allow us to move off this fork and update cobra zaquestion/lab#333 (comment) |
Anyone that depends on this can use https://github.com/rsteube/cobra-zsh-gen for now. |
@rsteube need context on this. What it does, and the issue it resolves. |
Pretty much the same as in bash: https://github.com/spf13/cobra/blob/master/bash_completions.md#creating-your-own-custom-functions It adds the possibility for custom shell functions to be called during completion. Example: https://github.com/spf13/cobra/pull/884/files#diff-19e30b5d85690dcb9fe96286af3eb405R382 This was not yet included in the original PR: https://github.com/spf13/cobra/blob/master/zsh_completions.md#whats-not-yet-supported |
Fixes knative#426 and a couple of patches on top which aren't merged yet - spf13/cobra#884 - spf13/cobra#899
Fixes knative#426 and a couple of patches on top which aren't merged yet - spf13/cobra#884 - spf13/cobra#899
Fixes knative#426 - and a couple of patches on top which aren't merged yet - spf13/cobra#884 - spf13/cobra#899 - also updates viper to 1.4.0
Fixes knative#426 - and a couple of patches on top which aren't merged yet - spf13/cobra#884 - spf13/cobra#899 - also updates viper to 1.4.0
* Updates spf13/cobra dep to v0.0.5 Fixes #426 - and a couple of patches on top which aren't merged yet - spf13/cobra#884 - spf13/cobra#899 - also updates viper to 1.4.0 * Updates to go.sum * Updates go.mod as a result of `go install golang.org/x/tools/cmd/goimports`
This PR is being marked as stale due to a long period of inactivity |
Added custom completions for zsh.