diff options
| author | Robinhuett <5955614+Robinhuett@users.noreply.github.com> | 2018-06-28 10:43:01 +0200 |
|---|---|---|
| committer | Robinhuett <5955614+Robinhuett@users.noreply.github.com> | 2018-06-28 10:43:01 +0200 |
| commit | 5c3264b3919be4f3fdac8e8fc77e86089dd71d04 (patch) | |
| tree | 1701e5cd28f235c21da92422924e8d8c881e80f0 /src/_ecdsautil | |
| parent | Merge pull request #577 from pseyfert/c_standards (diff) | |
| download | zsh-completions-5c3264b3919be4f3fdac8e8fc77e86089dd71d04.tar zsh-completions-5c3264b3919be4f3fdac8e8fc77e86089dd71d04.tar.gz zsh-completions-5c3264b3919be4f3fdac8e8fc77e86089dd71d04.tar.bz2 zsh-completions-5c3264b3919be4f3fdac8e8fc77e86089dd71d04.tar.lz zsh-completions-5c3264b3919be4f3fdac8e8fc77e86089dd71d04.tar.xz zsh-completions-5c3264b3919be4f3fdac8e8fc77e86089dd71d04.tar.zst zsh-completions-5c3264b3919be4f3fdac8e8fc77e86089dd71d04.zip | |
Added ecdsautils
Diffstat (limited to 'src/_ecdsautil')
| -rw-r--r-- | src/_ecdsautil | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/_ecdsautil b/src/_ecdsautil new file mode 100644 index 0000000..5d0a6f3 --- /dev/null +++ b/src/_ecdsautil @@ -0,0 +1,53 @@ +#compdef ecdsautil +# ------------------------------------------------------------------------------ +# Description +# ----------- +# +# Completion script for ecdsaultils v0.4.0 (https://github.com/tcatm/ecdsautils) +# +# ------------------------------------------------------------------------------ +# Authors +# ------- +# +# * Robinhuett <https://github.com/Robinhuett> +# +# ------------------------------------------------------------------------------ + +_ecdsautil_args() { + case $words[1] in + (sign) + _arguments '1:somefile:_files' + ;; + (verify) + _arguments '-s[signature]:secret:_files' '-p[publickey]:pubkey:_files' +'-n[signaturecount]:signaturecount:""' ':file:_files' + ;; + esac +} + +_ecdsautil() { + local -a commands + + commands=( + "help:Show help" + "generate-key:generate a new secret on stdout" + "show-key:output public key of secret read from stdin" + "sign:sign file" + "verify:verify signature of file" + ) + + _arguments -C \ + '1:cmd:->cmds' \ + '*:: :->args' \ + + case "$state" in + (cmds) + _describe -t commands 'commands' commands + ;; + (*) + _ecdsautil_args + ;; + esac +} + +_ecdsautil "$@" |
