_heroku-config() { COMPREPLY=() local word="${COMP_WORDS[COMP_CWORD]}" local words=("${COMP_WORDS[@]}") unset words[0] local completion=$(heroku-config completion ${words[@]}) COMPREPLY=( $(compgen -W "$completion" -- "$word") ) } complete -F _heroku-config heroku-config