Yerbacon/scripts/bash-completion.sh

15 lines
415 B
Bash
Raw Normal View History

# Bash autocomplete script for yerbacon
_ybconAutoComplete() {
local current previous options
COMPREPLY=()
current="${COMP_WORDS[COMP_CWORD]}"
previous="${COMP_WORDS[COMP_CWORD-1]}"
options='-h -p --help --printresult --version'
if [[ "${current}" == -* ]]; then
mapfile -t COMPREPLY <<< "$(compgen -W "$options" -- "$current") "
return 0
fi
}
complete -o nospace -F _ybconAutoComplete ybcon