diff options
author | Karel Kočí <cynerd@email.cz> | 2017-09-18 23:13:31 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-09-18 23:13:31 +0200 |
commit | dd30417fdba18a97945459b29e88cbbedb07874c (patch) | |
tree | a87b8dc76ab4b7ea5298bb55dc9abb9b6cc7fb25 /zsh_completions/usbkey | |
parent | 3370e45b1c4a6c476827e9467fb1d313bb9a2319 (diff) | |
download | myconfigs-dd30417fdba18a97945459b29e88cbbedb07874c.tar.gz myconfigs-dd30417fdba18a97945459b29e88cbbedb07874c.tar.bz2 myconfigs-dd30417fdba18a97945459b29e88cbbedb07874c.zip |
Add openvpn to usbkey
Diffstat (limited to 'zsh_completions/usbkey')
-rw-r--r-- | zsh_completions/usbkey | 17 |
1 files changed, 13 insertions, 4 deletions
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 |