3 [ -z "$BASH_VERSION" ] && return
5 ####################################################################################################
8 case "${COMP_CWORD}" in
10 COMPREPLY=($(compgen -W "help version list-apps launch action list-actions" -- "${COMP_WORDS[1]}"))
15 case "${COMP_WORDS[1]}" in
16 launch|action|list-actions)
17 COMPREPLY=($(compgen -W "`gapplication list-apps`" -- "${COMP_WORDS[2]}"))
29 # Otherwise, what we will do is based on the command in ${COMP_WORDS[1]}
30 case "${COMP_WORDS[1]}" in
32 # Word 3 is the action name. This is the only one we can help with.
33 if [ "${COMP_CWORD}" == 3 ]; then
34 COMPREPLY=($(compgen -W "`gapplication list-actions "${COMP_WORDS[2]}"`" -- "${COMP_WORDS[3]}"))
43 COMPREPLY=($(compgen -A file "${COMP_WORDS[COMP_CWORD]}"))
47 # Nothing else should be out this far...
53 ####################################################################################################
55 complete -F __app gapplication