Closed iamhsa closed 1 year ago
I've seen this error too and tracked it down to the NVM completion script:
https://github.com/nvm-sh/nvm/blob/7b530edd3a2a3ebc976c455394f7245827194da7/bash_completion#L99
/opt/homebrew/share/google-cloud-sdk/completion.zsh.inc:37: command not found: complete /opt/homebrew/share/google-cloud-sdk/completion.zsh.inc:62: command not found: complete /opt/homebrew/share/google-cloud-sdk/completion.zsh.inc:63: command not found: complete
Thanks for reporting this. Fixed.
z4h source "$HOMEBREW_PREFIX/share/google-cloud-sdk/path.zsh.inc"
Are you sure you need this? Try removing this line, restart your terminal and see if there are any commands you want to run that aren't working. If there are none, you don't need this line. (In general, don't add anything to your zsh startup files unless you can clearly see the positive effect of it.)
z4h source "$HOMEBREW_PREFIX/share/google-cloud-sdk/completion.zsh.inc"
This is now automatic. You can remove this line from .zshrc.
I've seen this error too and tracked it down to the NVM completions script:
https://github.com/nvm-sh/nvm/blob/7b530edd3a2a3ebc976c455394f7245827194da7/bash_completion#L99
If you can describe all steps that lead to an error, I might be able to do something about it.
If you can describe all steps that lead to an error, I might be able to do something about it.
It used to happen just opening a terminal and running z4h update
but I didn't reported it because I thought it might have been on my end. I just thought that adding some info to the discussion might help.
Thanks for fixing it.
My offer still stands: if you can describe all steps leading to the nvm error, I might be able to fix it.
Thanks for reporting this. Fixed.
Thanks you for your quick response.
Are you sure you need this?
I'm pretty sur I don't need it.
It was just to respect brew install
output
z4h update
no longer display command not found: complete
π
On the other hand, if I remove z4h source "$HOMEBREW_PREFIX/share/google-cloud-sdk/completion.zsh.inc"
from my ~/.zshrc
I no longer have the completions, so for now I keep it.
I suppose, this is something wrong on my side.
In fact, even with z4h source "$HOMEBREW_PREFIX/share/google-cloud-sdk/completion.zsh.inc"
in ~/.zshrc
completion isn't functional.
I'm pretty sur I don't need it. It was just to respect
brew install
output
If doing something was a good default, brew install
would've done it automatically.
z4h update
no longer displaycommand not found: complete
π
Thanks for verifying.
On the other hand, if I remove
z4h source "$HOMEBREW_PREFIX/share/google-cloud-sdk/completion.zsh.inc"
from my~/.zshrc
I no longer have the completions
Ouch. Fixed.
Works, like a charm!
I let issue open as @juangiordana seem to have a similar issue with nvm
Thank you so much for the quick fix, your time, and advice.
I let issue open as @juangiordana seem to have a similar issue with
nvm
They haven't submitted an issue report (what they do, what they see and what they expect). They are free to do so in a new issue.
Closing as done.
This fixed it.
I observe this after the fix, when completing gcloud in tmux:
β― gcloud zstyle:5: no such builtin: -T zstyle:5: no such builtin: -s
zstyle:5: no such builtin: -s zstyle:5: no such builtin: -a
zstyle:5: no such builtin: -a _next_label:9: bad math expression: operator expected at funcstack ...' zstyle:5: no such builtin: -s zstyle:5: no such builtin: -s zstyle:5: no such builtin: -s zstyle:5: no such builtin: -s zstyle:5: no such builtin: -s zstyle:5: no such builtin: -a zstyle:5: no such builtin: -a zstyle:5: no such builtin: -a zstyle:5: no such builtin: -s _description:71: bad math expression: operator expected at
comp_ignor...' _description:set:102: bad option: -M
It works ok out of tmux. I've got this in .zshrc:
zstyle ':z4h:' start-tmux 'no'
I've got gcloud installed manually (not with brew) so I added this to . zshrc:
z4h source ~/.gcloud/path.zsh.inc
z4h source ~/.gcloud/completion.zsh.inc
@romkatv tell me if you need more info. Thanks!
Please open a new issue and describe all steps necessary to reproduce this.
Please open a new issue and describe all steps necessary to reproduce this.
It was some misunderstood of mine. Sorry for bothering
During a
z4h update
, I observe this :I don't know if this is something wrong with the file
completion.zsh.inc
or with zsh4humans.Reproduce steps (on MacBook)
brew install google-cloud-sdk
exec zsh
gcloud <tab>
--> not functional~/.zshrc
add this two lines (as almost shown inbrew install
output)exec zsh
gcloud <tab>
--> Functionalz4h update
command not found: complete
3 times on output