CardiacPhase/Git/usr/share/bash-completion/completions/sdk

24 lines
402 B
Plaintext
Raw Normal View History

2019-05-06 16:34:28 +02:00
_sdk()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case "$prev" in
build|cd|init)
local projects=$(sdk valid_projects)
COMPREPLY=($(compgen -W "$projects" -- $cur))
return 0
;;
create-desktop-icon)
return 1
;;
esac
opts=$(sdk valid_commands)
COMPREPLY=($(compgen -W "$opts" -- $cur))
return 0
}
complete -F _sdk sdk