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