]> git.pld-linux.org Git - packages/webapps.git/blame - bash_completion.sh
- v0.3.2
[packages/webapps.git] / bash_completion.sh
CommitLineData
89dcabae
ER
1# webapp(1) completion
2#
3_webapp()
4{
5 local cur prev
6
7 COMPREPLY=()
8 cur=${COMP_WORDS[COMP_CWORD]}
9 prev=${COMP_WORDS[COMP_CWORD-1]}
10
11 case "$COMP_CWORD" in
12 1)
13 COMPREPLY=($( compgen -W 'register unregister list list-apps' -- $cur ))
14 ;;
15 2)
16 case "$prev" in
17 register|unregister|list)
18 COMPREPLY=($( compgen -W 'apache httpd lighttpd' -- $cur ))
19 ;;
20 esac
21 ;;
22 3)
23 case "${COMP_WORDS[COMP_CWORD-2]}" in
24 register)
25 COMPREPLY=($( compgen -W "$(webapp list-apps-unregistered $prev)" -- $cur ))
26 ;;
27 unregister)
28 COMPREPLY=($( compgen -W "$(webapp list-apps-registered $prev)" -- $cur ))
29 ;;
30 esac
31 ;;
32 esac
33
34# return 0
35}
36
37complete -F _webapp webapp
This page took 0.073174 seconds and 4 git commands to generate.