~benji/+junk/zsh-juju-completion

« back to all changes in this revision

Viewing changes to _juju

  • Committer: Benji York
  • Date: 2012-02-29 00:47:51 UTC
  • Revision ID: benji@benjiyork.com-20120229004751-edhv1d1rpgiu1at3
add license and keep a copy of the generated output for easy fetching

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#compdef juju
 
2
 
 
3
_hello() {
 
4
    local curcontext="$curcontext" state line
 
5
    typeset -A opt_args
 
6
 
 
7
    _arguments \
 
8
        '1: :->command'\
 
9
        '*: :->options'
 
10
 
 
11
    case $state in
 
12
    command)
 
13
        _arguments "1:command:(add-relation add-unit bootstrap get set debug-log debug-hooks deploy destroy-environment destroy-service expose open-tunnel remove-relation remove-unit resolved scp status ssh terminate-machine unexpose upgrade-charm)"
 
14
    ;;
 
15
    *)
 
16
        case $words[2] in
 
17
        
 
18
            add-relation)
 
19
                compadd "$@" - -h --help --environment -e --verbose
 
20
            ;;
 
21
            
 
22
            add-unit)
 
23
                compadd "$@" - -h --help --environment -e --num-units -n
 
24
            ;;
 
25
            
 
26
            bootstrap)
 
27
                compadd "$@" - -h --help --environment -e
 
28
            ;;
 
29
            
 
30
            get)
 
31
                compadd "$@" - -h --help --environment -e --schema -s
 
32
            ;;
 
33
            
 
34
            set)
 
35
                compadd "$@" - -h --help --environment -e --config
 
36
            ;;
 
37
            
 
38
            debug-log)
 
39
                compadd "$@" - -h --help -e --environment -r --replay -i --include -x --exclude -l --level -n --limit -o --output
 
40
            ;;
 
41
            
 
42
            debug-hooks)
 
43
                compadd "$@" - -h --help -e --environment
 
44
            ;;
 
45
            
 
46
            deploy)
 
47
                compadd "$@" - -h --help --environment -e --num-units -n --repository --config
 
48
            ;;
 
49
            
 
50
            destroy-environment)
 
51
                compadd "$@" - -h --help --environment -e
 
52
            ;;
 
53
            
 
54
            destroy-service)
 
55
                compadd "$@" - -h --help --environment -e
 
56
            ;;
 
57
            
 
58
            expose)
 
59
                compadd "$@" - -h --help --environment -e
 
60
            ;;
 
61
            
 
62
            open-tunnel)
 
63
                compadd "$@" - -h --help --environment -e
 
64
            ;;
 
65
            
 
66
            remove-relation)
 
67
                compadd "$@" - -h --help --environment -e --verbose
 
68
            ;;
 
69
            
 
70
            remove-unit)
 
71
                compadd "$@" - -h --help --environment -e
 
72
            ;;
 
73
            
 
74
            resolved)
 
75
                compadd "$@" - -h --help --retry -r --environment -e
 
76
            ;;
 
77
            
 
78
            scp)
 
79
                compadd "$@" - -h --help --environment -e
 
80
            ;;
 
81
            
 
82
            status)
 
83
                compadd "$@" - -h --help --environment -e --output --format
 
84
            ;;
 
85
            
 
86
            ssh)
 
87
                compadd "$@" - -h --help --environment -e
 
88
            ;;
 
89
            
 
90
            terminate-machine)
 
91
                compadd "$@" - -h --help --environment -e
 
92
            ;;
 
93
            
 
94
            unexpose)
 
95
                compadd "$@" - -h --help --environment -e
 
96
            ;;
 
97
            
 
98
            upgrade-charm)
 
99
                compadd "$@" - -h --help --dry-run -n --environment -e --repository
 
100
            ;;
 
101
            
 
102
        esac
 
103
    esac
 
104
}
 
105
 
 
106
_hello "$@"
 
107