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

Support auto completion for bash and zsh #93

Merged
merged 1 commit into from
Jul 16, 2020
Merged

Support auto completion for bash and zsh #93

merged 1 commit into from
Jul 16, 2020

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Jul 15, 2020

Signed-off-by: Ben Ye yb532204897@gmail.com

What this PR does / why we need it:

Add an ormb completion command to generate auto completion script for bash and zsh, just like kubectl completion.

Which issue(s) this PR is related to (optional, link to 3rd issue(s)):

Fixes #

Reference to #

Special notes for your reviewer:

/cc @gaocegege

Release note:

NONE

Signed-off-by: Ben Ye <yb532204897@gmail.com>
var completionCmd = &cobra.Command{
Use: "completion",
Short: "Output shell completion code for the specified shell (bash or zsh)",
Example: ` # Installing bash completion on macOS using homebrew
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it hand written?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, almost copied from kubectl example. Anything needs to update here?

Copy link
Member

@gaocegege gaocegege left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@gaocegege gaocegege merged commit c47a92b into kleveross:master Jul 16, 2020
@yeya24 yeya24 deleted the support-completion branch July 16, 2020 01:21
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

2 participants