-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
_arguments:comparguments:325: can only be called from completion function #285
Comments
It doesn't a throw an error for me on my oh-my-zsh setup with zsh 5.8 (x86_64-apple-darwin20.0). |
The error is thrown, when the autocompletions are loaded, e.g. when I start a new instance of my zsh (zsh 5.7.1 (x86_64-apple-darwin19.0)). The error thrown due to the fact that the |
I was seeing this issue until I realised that rather than sourcing the completions they needed to be put into a directory on zsh's # Create a folder ~/.zsh to put files zsh will load
mkdir "${HOME}/.zsh"
flamegraph --completions zsh > "${HOME}/.zsh/.flamegraph-completion.zsh"
# Add .zsh to your fpath when the zsh shell starts
echo 'fpath+=~/.zsh' >>"${HOME}/.zshrc" |
hey -- About my environmentMacOS Ventura 13.0.1 In the antibody-plugins I loaded kubectx before I loaded ohmyzsh using |
ok, I found a solution!
sending a pr |
I found this script somwhere and it helped, just copy and paste it into the zsh terminal and the commands will run just fine. cd ~
mkdir ~/.zsh
swift package completion-tool generate-zsh-script > ~/.zsh/_swift
echo -e "fpath=(~/.zsh \$fpath)\n" >> ~/.zshrc
echo -e "autoload -Uz compinit && compinit" >> ~/.zshrc |
The zsh completion scripts make zsh throw an error.
_arguments:comparguments:325: can only be called from completion function
This is due to the fact, that both zsh completion scripts call
_arguments
outside a function.Fix
Put the completion scripts into a function, as shown below:
kubectx.zsh
kubens.zsh
The text was updated successfully, but these errors were encountered: