# Bash autocomplete script for yerbacon function YCompReply() { mapfile -t COMPREPLY <<< "$1"; } _ybconAutoComplete() { compopt +o default local current previous options COMPREPLY=() current="${COMP_WORDS[COMP_CWORD]}" previous="${COMP_WORDS[COMP_CWORD-1]}" options='-h -p -t --help --parallel --target= --newlines= --printresult --text --version --buildInfo' if [[ "${current}" == -* ]]; then YCompReply "$(compgen -W "$options" -- "$current")" return 0 else case "${previous}" in -h | --help | --version ) return 0 ;; esac complete -f -o plusdirs -X '!*.ybcon' ybcon fi } complete -F _ybconAutoComplete ybcon