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

Add support for bash completions #9

Merged
merged 1 commit into from May 8, 2019

Conversation

Projects
None yet
2 participants
@cblecker
Copy link
Contributor

commented May 8, 2019

No description provided.

@cblecker cblecker force-pushed the cblecker:completions branch 3 times, most recently from 8bd0fcc to c3fb813 May 8, 2019

@jhernand
Copy link
Collaborator

left a comment

Thanks @cblecker, very nice addition. Just a minor comment about moving the new command to its own package. Once you do that I will merge and make a new release.

@@ -63,6 +63,7 @@ func init() {
root.AddCommand(token.Cmd)
root.AddCommand(version.Cmd)
root.AddCommand(cluster.Cmd)
root.AddCommand(completionCmd)

This comment has been minimized.

Copy link
@jhernand

jhernand May 8, 2019

Collaborator

All the other commands in the CLI live in their own package. Can you do the same for this one? Create a new cmd/uhc/completion directory and put the code there. Then this will be root.AddCommand(completion.Cmd).

This comment has been minimized.

Copy link
@cblecker

cblecker May 8, 2019

Author Contributor

This isn't easily done, as I need to refer back to the top-level command (root): https://github.com/openshift-online/uhc-cli/pull/9/files#diff-7e01ad4f5f72c98103727d222dba6a64R42

This comment has been minimized.

Copy link
@jhernand

jhernand May 8, 2019

Collaborator

You can do cmd.Root()....

This comment has been minimized.

Copy link
@cblecker

cblecker May 8, 2019

Author Contributor

Thanks for the tip! Fixed.

@@ -0,0 +1,47 @@
/*
Copyright (c) 2018 Red Hat, Inc.

This comment has been minimized.

Copy link
@jhernand

jhernand May 8, 2019

Collaborator

2019

This comment has been minimized.

Copy link
@cblecker

cblecker May 8, 2019

Author Contributor

Fixed!

@cblecker cblecker force-pushed the cblecker:completions branch from c3fb813 to b877b67 May 8, 2019

@cblecker cblecker force-pushed the cblecker:completions branch from b877b67 to 5e50bc9 May 8, 2019

@jhernand

This comment has been minimized.

Copy link
Collaborator

commented May 8, 2019

Thanks @cblecker, looks good, I am merging.

@jhernand jhernand merged commit 903c0d1 into openshift-online:master May 8, 2019

1 check passed

ci.ext.devshift.net PR build
Details

@cblecker cblecker deleted the cblecker:completions branch May 8, 2019

@jhernand

This comment has been minimized.

Copy link
Collaborator

commented May 8, 2019

@cblecker your change is included in release 0.1.11.

@cblecker

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2019

Thanks @jhernand!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.