%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
# bash completion for secret-tool(1) -*- shell-script -*-
_secret_tool()
{
local cur prev words cword split
_init_completion -s || return
$split && return
local -i i
local mode word
for i in ${!words[*]}; do
if [[ $i -gt 0 && ${words[i]} != -* ]]; then
((i != cword)) && mode=${words[i]}
break
fi
done
if [[ ! -v mode ]]; then
local -a modes
modes=($("$1" nonexistent-mode 2>&1 |
while read -r first second third rest; do
if [[ $first == "${1##*/}" ]]; then
printf "%s\n" "$second"
elif [[ $first == usage: && $second == "${1##*/}" ]]; then
printf "%s\n" "$third"
fi
done))
COMPREPLY=($(compgen -W '${modes[@]}' -- "$cur"))
return
fi
case $mode in
store)
if [[ ${words[*]} != *\ --label[\ =]* ]]; then
COMPREPLY=($(compgen -W "--label=" -- "$cur"))
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
fi
;;
search)
local -A opts=([--all]="" [--unlock]="")
for word in "${words[@]:2}"; do
[[ $word ]] && unset opts["$word"]
done
COMPREPLY=($(compgen -W '${opts[@]}' -- "$cur"))
;;
esac
} &&
complete -F _secret_tool secret-tool
# ex: filetype=sh