_bti() { local cur prev COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" if [[ "${cur}" == -* ]] ; then COMPREPLY=( $(compgen -W "-a -p -P -H -b -d -v -h --account \ --password --proxy --host --bash --debug --version \ --help" -- ${cur}) ) fi if [[ "${prev}" == "--host" ]] ; then COMPREPLY=( $(compgen -W "twitter identica" -- ${cur} ) ) fi return 0 } complete -F _bti bti