aboutsummaryrefslogtreecommitdiff
path: root/zsh_completions/usbkey
diff options
context:
space:
mode:
Diffstat (limited to 'zsh_completions/usbkey')
-rw-r--r--zsh_completions/usbkey17
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