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

macOS m1 Colima completion should point to /opt/homebrew #98

Closed
richtong opened this issue Jan 1, 2022 · 2 comments
Closed

macOS m1 Colima completion should point to /opt/homebrew #98

richtong opened this issue Jan 1, 2022 · 2 comments

Comments

@richtong
Copy link

richtong commented Jan 1, 2022

Using colima on an M1 mac, seems to be working one comment is that the text for the completions should change:

colima completion zsh --help

Says you should pip it to /usr/local but with m1, this has moved to /opt/homebrew if it is installed that way, so it should say when you run colima completion zsh --help:

To load completions for every new session, execute once:
# Linux or MacOS M1:
$ colima completion zsh > "${fpath[1]}/_colima"
# macOS Intel:
$ colima completion zsh > /usr/local/share/zsh/site-functions/_colima
# if homebrew installed
$ colima completion zsh > $(brew --prefix)/share/zsh/site-function/_colima

As an aside, if you do not what to make it that complicate the at least for Linux and M1, you can just use the fpath. Finally,
this says run it once, but this means that completions will get stale if you ever change the file, so the safer thing to
do is to put this into ~/.zshrc or ~/.bash_profile so that it refreshes

@mothershipper
Copy link

I think you want to file this upstream:

https://github.com/spf13/cobra/blob/master/completions.go#L665-L682

@richtong
Copy link
Author

Ok will do :-)

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

No branches or pull requests

2 participants