10 cur=${COMP_WORDS[COMP_CWORD]}
11 prev=${COMP_WORDS[COMP_CWORD-1]}
15 COMPREPLY=($( compgen -W 'register unregister list list-apps' -- $cur ))
19 register|unregister|list)
20 COMPREPLY=($( compgen -W 'apache httpd lighttpd' -- $cur ))
25 case "${COMP_WORDS[COMP_CWORD-2]}" in
27 COMPREPLY=($( compgen -W "$(webapp list-apps-unregistered $prev)" -- $cur ))
30 COMPREPLY=($( compgen -W "$(webapp list-apps-registered $prev)" -- $cur ))
39 complete -F _webapp webapp