pass-cli.plugin.zsh
454 bytes
1# Autocompletion for Proton Pass CLI (pass-cli)
2if (( ! $+commands[pass-cli] )); then
3 return
4fi
5
6# If the completion file doesn't exist yet, we need to autoload it and
7# bind it to `pass-cli`. Otherwise, compinit will have already done that.
8if [[ ! -f "$ZSH_CACHE_DIR/completions/_pass-cli" ]]; then
9 typeset -g -A _comps
10 autoload -Uz _pass-cli
11 _comps[pass-cli]=_pass-cli
12fi
13
14pass-cli completions zsh >| "$ZSH_CACHE_DIR/completions/_pass-cli" &|