8 cur=${COMP_WORDS[COMP_CWORD]}
9 prev=${COMP_WORDS[COMP_CWORD-1]}
13 COMPREPLY=($( compgen -W 'register unregister list list-apps' -- $cur ))
17 register|unregister|list)
18 COMPREPLY=($( compgen -W 'apache httpd lighttpd' -- $cur ))
23 case "${COMP_WORDS[COMP_CWORD-2]}" in
25 COMPREPLY=($( compgen -W "$(webapp list-apps-unregistered $prev)" -- $cur ))
28 COMPREPLY=($( compgen -W "$(webapp list-apps-registered $prev)" -- $cur ))
37 complete -F _webapp webapp