From dd30417fdba18a97945459b29e88cbbedb07874c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 18 Sep 2017 23:13:31 +0200 Subject: Add openvpn to usbkey --- zsh_completions/usbkey | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'zsh_completions/usbkey') diff --git a/zsh_completions/usbkey b/zsh_completions/usbkey index 0de1375..eada8f6 100644 --- a/zsh_completions/usbkey +++ b/zsh_completions/usbkey @@ -21,6 +21,15 @@ _usbkey () { done _describe -t keys 'usbkey' keys ;; + openvpn-get) + [ -d "/media/usbkey/openvpn" ] || return + local certs=() + for F in $(find "/media/usbkey/openvpn" -name 'ca.crt' -o -name '*.crt' -print); do + F="${F#/media/usbkey/openvpn/}" + certs+=("${F%.crt}") + done + _describe -t certificates 'usbkey' certs + ;; # TODO esac else @@ -34,10 +43,10 @@ _usbkey () { "gpg-import:Import gpg key" "ssh-import:Import ssh key" "ssh-generate:Generate new ssh key" - "ssh-list:List all keys in store" - "openvpn-list:List all keys" - "openvpn-get:Get keys for some host" - "openvpn-generate:Generate key for new host" + "ssh-list:List all SSH keys in store" + "openvpn-list:List all OpenVPN keys" + "openvpn-get:Get OpenVPN keys for some host" + "openvpn-generate:Generate OpenVPN key for new host" ) fi _describe -t operations 'usbkey' operations -- cgit v1.2.3