1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-09 17:00:44 +01:00

feat(sops): introduce sops plugin

This commit is contained in:
Florian Rey
2024-10-14 13:58:59 +02:00
parent 7bbebcd520
commit 09b2eefef9
2 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# Completion
if (( ! $+commands[sops] )); then
return
fi
_sops() {
local -a opts
local cur
cur=${words[-1]}
if [[ "$cur" == "-"* ]]; then
opts=("${(@f)$(${words[@]:0:#words[@]-1} ${cur} --generate-shell-completion)}")
else
opts=("${(@f)$(${words[@]:0:#words[@]-1} --generate-shell-completion)}")
fi
if [[ "${opts[1]}" != "" ]]; then
_describe 'values' opts
else
_files
fi
}
compdef _sops sops