~benji/+junk/zsh-juju-completion

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#compdef juju

_hello() {
    local curcontext="$curcontext" state line
    typeset -A opt_args

    _arguments \
        '1: :->command'\
        '*: :->options'

    case $state in
    command)
        _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)"
    ;;
    *)
        case $words[2] in
        
            add-relation)
                compadd "$@" - -h --help --environment -e --verbose
            ;;
            
            add-unit)
                compadd "$@" - -h --help --environment -e --num-units -n
            ;;
            
            bootstrap)
                compadd "$@" - -h --help --environment -e
            ;;
            
            get)
                compadd "$@" - -h --help --environment -e --schema -s
            ;;
            
            set)
                compadd "$@" - -h --help --environment -e --config
            ;;
            
            debug-log)
                compadd "$@" - -h --help -e --environment -r --replay -i --include -x --exclude -l --level -n --limit -o --output
            ;;
            
            debug-hooks)
                compadd "$@" - -h --help -e --environment
            ;;
            
            deploy)
                compadd "$@" - -h --help --environment -e --num-units -n --repository --config
            ;;
            
            destroy-environment)
                compadd "$@" - -h --help --environment -e
            ;;
            
            destroy-service)
                compadd "$@" - -h --help --environment -e
            ;;
            
            expose)
                compadd "$@" - -h --help --environment -e
            ;;
            
            open-tunnel)
                compadd "$@" - -h --help --environment -e
            ;;
            
            remove-relation)
                compadd "$@" - -h --help --environment -e --verbose
            ;;
            
            remove-unit)
                compadd "$@" - -h --help --environment -e
            ;;
            
            resolved)
                compadd "$@" - -h --help --retry -r --environment -e
            ;;
            
            scp)
                compadd "$@" - -h --help --environment -e
            ;;
            
            status)
                compadd "$@" - -h --help --environment -e --output --format
            ;;
            
            ssh)
                compadd "$@" - -h --help --environment -e
            ;;
            
            terminate-machine)
                compadd "$@" - -h --help --environment -e
            ;;
            
            unexpose)
                compadd "$@" - -h --help --environment -e
            ;;
            
            upgrade-charm)
                compadd "$@" - -h --help --dry-run -n --environment -e --repository
            ;;
            
        esac
    esac
}

_hello "$@"