1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
_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