diff --git a/scripts/bash-completion.sh b/scripts/bash-completion.sh index ee4ecd9..8e92018 100644 --- a/scripts/bash-completion.sh +++ b/scripts/bash-completion.sh @@ -1 +1,15 @@ # Bash autocomplete script for yerbacon + +_ybconAutoComplete() { + local current previous options + COMPREPLY=() + current="${COMP_WORDS[COMP_CWORD]}" + previous="${COMP_WORDS[COMP_CWORD-1]}" + options="-p --help --printresult" + if [[ ${current} == -* ]]; then + COMPREPLY=( "$(compgen -W "$options" -- "$current")" ) + return 0 + fi +} + +complete -F _ybconAutoComplete ybcon \ No newline at end of file