feat(pass-cli): add completions plugin (#13740)

This commit is contained in:
Kaspar V.
2026-05-18 08:47:51 +02:00
committed by GitHub
parent efd6135bf5
commit 24959d5817
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
# Proton Pass CLI plugin
This plugin adds completions for [Proton Pass CLI](https://protonpass.github.io/pass-cli/).
To use it, add `pass-cli` to the plugins array in your zshrc file:
```zsh
plugins=(... pass-cli)
```
This plugin does not add any aliases.

View File

@@ -0,0 +1,14 @@
# Autocompletion for Proton Pass CLI (pass-cli)
if (( ! $+commands[pass-cli] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `pass-cli`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_pass-cli" ]]; then
typeset -g -A _comps
autoload -Uz _pass-cli
_comps[pass-cli]=_pass-cli
fi
pass-cli completions zsh >| "$ZSH_CACHE_DIR/completions/_pass-cli" &|