1
0
Fork 0
mirror of https://github.com/pivpn/pivpn.git synced 2024-12-23 13:20:16 +00:00
pivpn/scripts/bash-completion
2016-04-19 14:01:55 -04:00

18 lines
416 B
Text

_pivpn()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="debug add list revoke uninstall help"
if [[ ${cur} == -* ]] ; then
opts="-a -d -l -r -h -u"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
}
complete -F _pivpn pivpn