aboutsummaryrefslogtreecommitdiff
path: root/bash_completions/usbkey
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-09-18 23:13:31 +0200
committerKarel Kočí <cynerd@email.cz>2017-09-18 23:13:31 +0200
commitdd30417fdba18a97945459b29e88cbbedb07874c (patch)
treea87b8dc76ab4b7ea5298bb55dc9abb9b6cc7fb25 /bash_completions/usbkey
parent3370e45b1c4a6c476827e9467fb1d313bb9a2319 (diff)
downloadmyconfigs-dd30417fdba18a97945459b29e88cbbedb07874c.tar.gz
myconfigs-dd30417fdba18a97945459b29e88cbbedb07874c.tar.bz2
myconfigs-dd30417fdba18a97945459b29e88cbbedb07874c.zip
Add openvpn to usbkey
Diffstat (limited to 'bash_completions/usbkey')
-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