From a2cb9bbed3b0787cbea62d6a04083ff24e4f5a27 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Fri, 6 Apr 2018 20:08:40 -0500 Subject: 42604: new completions for OpenBSD's signify and vmctl --- ChangeLog | 4 +++ Completion/BSD/Command/_signify | 31 ++++++++++++++++ Completion/BSD/Command/_vmctl | 79 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 Completion/BSD/Command/_signify create mode 100644 Completion/BSD/Command/_vmctl diff --git a/ChangeLog b/ChangeLog index 2e44a1102..db3b564f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2018-04-07 Oliver Kiddle + * Matthew Martin: 42604: Completion/BSD/Command/_signify, + Completion/BSD/Command/_vmctl: new completions for OpenBSD's + signify and vmctl + * github #24: Klas Mellbourn: Completion/X/Command/_code: Add completion script for Visual Studio Code diff --git a/Completion/BSD/Command/_signify b/Completion/BSD/Command/_signify new file mode 100644 index 000000000..26571aa2a --- /dev/null +++ b/Completion/BSD/Command/_signify @@ -0,0 +1,31 @@ +#compdef signify + +_arguments -s -S -A "-*" : \ + - checksum \ + '-C[verify a signed checksum list and the checksum for each file]' \ + '-p[public key]:public key:_files' \ + '-q[quiet mode]' \ + '-x[signature file]:signature file:_files' \ + '*:file:_files' \ + - generate \ + '-G[generate a new key pair]' \ + '-c[specify comment]:comment:' \ + '-n[do not ask for passphrase]' \ + '-p[public key]:public key:_files' \ + '-s[secret key]:secret key:_files' \ + - sign \ + '-S[sign a message and create a signature]' \ + '-e[embed the message after the signature]' \ + '-m[file containing message]:message file:_files' \ + '-s[secret key]:secret key:_files' \ + '-x[signature file]:signature file:_files' \ + '-z[embed signature in gzip header]' \ + - verify \ + '-V[verify the message and signature match]' \ + '-e[extract the message from the signature]' \ + '-m[file containing message to verify or destination to extract]:message file:_files' \ + '-p[public key]:public key:_files' \ + '-q[quiet mode]' \ + '-t[restrict verification to specified key type]:key type:((base\:"base sets" fw\:firmware pkg\:packages syspatch\:syspatches))' \ + '-x[signature file]:signature file:_files' \ + '-z[verify signature in gzip header]' diff --git a/Completion/BSD/Command/_vmctl b/Completion/BSD/Command/_vmctl new file mode 100644 index 000000000..4e66c2383 --- /dev/null +++ b/Completion/BSD/Command/_vmctl @@ -0,0 +1,79 @@ +#compdef vmctl + +local context line state state_descr +local -a subcommands vmctl_status +local -A opt_args + +_vm_name() { + compadd "$@" - ${${${(@f)"$(_call_program vmctl_status vmctl status)"}[2,-1]}##* } +} + +_vm_switch() { + [[ -r /etc/vm.conf ]] && + compadd "$@" - ${${${(M)${(f)"$(