_geeknote_command() { COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" SAVE_IFS=$IFS IFS=" " args="${COMP_WORDS[*]:1}" IFS=$SAVE_IFS COMPREPLY=( $(compgen -W "`geeknote autocomplete ${args}`" -- ${cur}) ) return 0 } complete -F _geeknote_command geeknote