Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

rsteube
Copy link
Contributor

@rsteube rsteube commented Jun 12, 2019

Added custom completions for zsh.

@CLAassistant
Copy link

CLAassistant commented Jun 12, 2019

CLA assistant check
All committers have signed the CLA.

chmouel added a commit to chmouel/tektoncd-cli that referenced this pull request Aug 20, 2019
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>
tekton-robot pushed a commit to tektoncd/cli that referenced this pull request Aug 21, 2019
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>
@zaquestion
Copy link

@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)

@rsteube
Copy link
Contributor Author

rsteube commented Sep 26, 2019

Anyone that depends on this can use https://github.com/rsteube/cobra-zsh-gen for now.

@jharshman
Copy link
Collaborator

@rsteube need context on this. What it does, and the issue it resolves.

@rsteube
Copy link
Contributor Author

rsteube commented Sep 27, 2019

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.
E.g. to provide dynamic completion arguments by calling a separate program or depend on what has already been completed previously.

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

navidshaikh added a commit to navidshaikh/client that referenced this pull request Oct 11, 2019
 Fixes knative#426

 and a couple of patches on top which aren't merged yet

 - spf13/cobra#884
 - spf13/cobra#899
navidshaikh added a commit to navidshaikh/client that referenced this pull request Oct 23, 2019
 Fixes knative#426

 and a couple of patches on top which aren't merged yet

 - spf13/cobra#884
 - spf13/cobra#899
navidshaikh added a commit to navidshaikh/client that referenced this pull request Oct 24, 2019
 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
navidshaikh added a commit to navidshaikh/client that referenced this pull request Oct 29, 2019
 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
knative-prow-robot pushed a commit to knative/client that referenced this pull request Oct 30, 2019
* 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`
@github-actions
Copy link

github-actions bot commented Apr 5, 2020

This PR is being marked as stale due to a long period of inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants