You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#compdef examples
compdef _examples examples
_examples() {
local IFS=$'\n'local -a completions
completions=($(GO_FLAGS_COMPLETION=1 "${words[@]}"))
if [[ -n"$completions" ]];then
_describe 'command' completions
fireturn 1
}
# don't run the completion function when being source-ed or eval-edif [ "$funcstack[1]"="_examples" ];then
_examples "$@"fi
Where examples is just the name of the installed executable.
Note: This script needs to be installed in one of the $fpath directors, and needs to be loaded / inited via something like autoload -U compinit in your .zshrc. I'm a little unclear on specifics here, but if it helps this is what I have in my .zshrc:
Currently documentation provides an example of completion for bash shell only.
zsh is one of the popular shells. it would be great to have completion example for this shell as well.
The text was updated successfully, but these errors were encountered: