20 lines
465 B
Bash
20 lines
465 B
Bash
#!/bin/bash
|
|
|
|
_kickstart_autocomplete() {
|
|
|
|
local cur=${COMP_WORDS[COMP_CWORD]}
|
|
|
|
if [ "$COMP_CWORD" -eq 1 ]; then
|
|
COMPREPLY=( $(compgen -W "$(kickstart commands)" -- "$cur") )
|
|
fi
|
|
|
|
if [ "$COMP_CWORD" -eq 2 ] && [[ "${COMP_WORDS[1]}" == "doc" ]]; then
|
|
COMPREPLY=( $(compgen -W "$(kickstart doc 2> /dev/null)" -- "$cur") )
|
|
fi
|
|
|
|
return 0;
|
|
}
|
|
|
|
[ -n "$ZSH_NAME" ] && autoload -U bashcompinit && bashcompinit
|
|
complete -F _kickstart_autocomplete kickstart
|