aboutsummaryrefslogtreecommitdiff
path: root/bash_completions
diff options
context:
space:
mode:
Diffstat (limited to 'bash_completions')
-rw-r--r--bash_completions/usbkey11
1 files changed, 10 insertions, 1 deletions
diff --git a/bash_completions/usbkey b/bash_completions/usbkey
index 10cb0b9..acd6877 100644
--- a/bash_completions/usbkey
+++ b/bash_completions/usbkey
@@ -22,11 +22,20 @@ _usbkey() {
done
COMPREPLY+=($(compgen -W "${keys}" -- ${cur}))
;;
+ 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="$certs ${F%.crt}"
+ done
+ COMPREPLY+=($(compgen -W "${certs}" -- ${cur}))
+ ;;
esac
else
local ops="-h --help mount sync"
if _usbkey_mounted; then
- ops="$ops unmount ssh-list ssh-generate ssh-import"
+ ops="$ops unmount gpg-import ssh-list ssh-generate ssh-import openvpn-list openvpn-get openvpn-generate"
fi
COMPREPLY+=($(compgen -W "${ops}" -- ${cur}))
fi