2021-02-25 22:02:27 +01:00
|
|
|
# Bash autocomplete script for yerbacon
|
2021-02-25 22:49:26 +01:00
|
|
|
|
|
|
|
_ybconAutoComplete() {
|
|
|
|
local current previous options
|
|
|
|
COMPREPLY=()
|
|
|
|
current="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
previous="${COMP_WORDS[COMP_CWORD-1]}"
|
2021-02-27 13:20:41 +01:00
|
|
|
options='-h -p --help --printresult --version'
|
2021-02-26 12:32:18 +01:00
|
|
|
if [[ "${current}" == -* ]]; then
|
2021-02-27 13:20:41 +01:00
|
|
|
mapfile -t COMPREPLY <<< "$(compgen -W "$options" -- "$current") "
|
2021-02-25 22:49:26 +01:00
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2021-02-26 12:32:18 +01:00
|
|
|
complete -o nospace -F _ybconAutoComplete ybcon
|