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

gcloud completions #5

Open
jthegedus opened this issue Mar 5, 2020 · 3 comments
Open

gcloud completions #5

jthegedus opened this issue Mar 5, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jthegedus
Copy link
Owner

jthegedus commented Mar 5, 2020

Is your feature request related to a problem? Please describe.

GCloud supports shell autocompletions. It outputs the setup at the end of installation. However, the path to the completions changes with each version and is therefore unmaintainable when changing gcloud versions across projects.

Describe the solution you'd like

asdf-gcloud should output correct recommendations for sourcing shell completions.

Describe alternatives you've considered

NA

Additional context

Screen Shot 2020-03-05 at 8 10 30 pm

@jthegedus jthegedus added the enhancement New feature or request label Mar 5, 2020
@jthegedus jthegedus changed the title GCloud completions gcloud completions Mar 5, 2020
@jthegedus jthegedus self-assigned this Mar 5, 2020
@jthegedus
Copy link
Owner Author

jthegedus commented Mar 8, 2020

@jonnydgreen
Copy link

Did you find a solution for this in the end? Anything I can help with?

@mrWinston
Copy link

This is probably a bit late, but you can use the command asdf where gcloud to get the installation path of the currently used gcloud version, e.g:

~/ $ asdf where gcloud
/home/me/.asdf/installs/gcloud/462.0.0
~/ $ asdf shell gcloud 466.0.0 
~/ $ asdf where gcloud        
/home/me/.asdf/installs/gcloud/466.0.0

You can then use the following line in your .zshrc/.bashrc to always source from the currently active installation

source "$(asdf where gcloud)/completions.zsh.inc"

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

No branches or pull requests

3 participants