1 | _sugar_jhbuild() |
---|
2 | { |
---|
3 | local cur prev opts |
---|
4 | COMPREPLY=() |
---|
5 | cur="${COMP_WORDS[COMP_CWORD]}" |
---|
6 | prev="${COMP_WORDS[COMP_CWORD-1]}" |
---|
7 | opts="-h --help -f --file= -m --moduleset= --no-interact" |
---|
8 | commands="autobuild bootstrap bot build buildone checkbranches checkmodulesets clean cleanone depscheck dot gui help info list make rdepends run sanitycheck shell snapshot sysdeps tinderbox uninstall update updateone" |
---|
9 | opts="${opts} ${commands}" |
---|
10 | |
---|
11 | case "${prev}" in |
---|
12 | autobuild) |
---|
13 | local cmd_opts="-h --help -a --autogen -c --clean --distcheck -s --skip= -t --start-at= -r --report-url -v --verbose" |
---|
14 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
15 | return 0 |
---|
16 | ;; |
---|
17 | bootstrap) |
---|
18 | local cmd_opts="-h --help -a --autogen -c --clean --check -d --dist --distcheck --ignore-suggests -n --no-network -q --quiet -s --skip= -t --start-at= --tags= -D -x --no-xvfb -C --try-checkout -N --no-poison -f --force --build-optional-modules --min-age=" |
---|
19 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
20 | return 0 |
---|
21 | ;; |
---|
22 | bot) |
---|
23 | local cmd_opts="-h --help --setup --start --stop --start-server --reload-server-config --stop-server --daemon --pidfile= --logfile= --slaves-dir= --buildbot-dir= --mastercfg= --step" |
---|
24 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
25 | return 0 |
---|
26 | ;; |
---|
27 | build) |
---|
28 | local cmd_opts="-h --help -a --autogen -c --clean --check -d --dist --distcheck --ignore-suggests -n --no-network -q --quiet -s --skip= -t --start-at= --tags= -D -x --no-xvfb -C --try-checkout -N --no-poison -f --force --build-optional-modules --min-age=" |
---|
29 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
30 | return 0 |
---|
31 | ;; |
---|
32 | buildone) |
---|
33 | local cmd_opts="-h --help -a --autogen -c --clean --check -d --dist --distcheck -n --no-network -q --quiet -D -x --no-xvfb -f --force --min-age=" |
---|
34 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
35 | return 0 |
---|
36 | ;; |
---|
37 | checkbranches) |
---|
38 | local cmd_opts="-h --help -b --branch=" |
---|
39 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
40 | return 0 |
---|
41 | ;; |
---|
42 | checkmodulesets) |
---|
43 | local cmd_opts="-h --help" |
---|
44 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
45 | return 0 |
---|
46 | ;; |
---|
47 | checkmodulesets) |
---|
48 | local cmd_opts="-h --help" |
---|
49 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
50 | return 0 |
---|
51 | ;; |
---|
52 | clean) |
---|
53 | local cmd_opts="-h --help -s --skip= -t --start-at=" |
---|
54 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
55 | return 0 |
---|
56 | ;; |
---|
57 | cleanone) |
---|
58 | local cmd_opts="-h --help --honour-config" |
---|
59 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
60 | return 0 |
---|
61 | ;; |
---|
62 | depscheck) |
---|
63 | local cmd_opts="-h --help -s --script" |
---|
64 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
65 | return 0 |
---|
66 | ;; |
---|
67 | dot) |
---|
68 | local cmd_opts="-h --help --soft-deps --clusters" |
---|
69 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
70 | return 0 |
---|
71 | ;; |
---|
72 | gui) |
---|
73 | local cmd_opts="-h --help" |
---|
74 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
75 | return 0 |
---|
76 | ;; |
---|
77 | info) |
---|
78 | local cmd_opts="-h --help" |
---|
79 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
80 | return 0 |
---|
81 | ;; |
---|
82 | list) |
---|
83 | local cmd_opts="-h --help -r --show-revision -t --start-at= --tags= --ignore-suggests --list-optional-modules -a --all-modules" |
---|
84 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
85 | return 0 |
---|
86 | ;; |
---|
87 | make) |
---|
88 | local cmd_opts="-h --help -a --autogen -c --clean --check -q --quiet" |
---|
89 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
90 | return 0 |
---|
91 | ;; |
---|
92 | rdepends) |
---|
93 | local cmd_opts="-h --help --dependencies --direct" |
---|
94 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
95 | return 0 |
---|
96 | ;; |
---|
97 | run) |
---|
98 | local cmd_opts="-h --help --in-builddir= --in-checkoutdir= sugar-emulator --fullscreen" |
---|
99 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
100 | return 0 |
---|
101 | ;; |
---|
102 | sanitycheck) |
---|
103 | local cmd_opts="-h --help" |
---|
104 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
105 | return 0 |
---|
106 | ;; |
---|
107 | shell) |
---|
108 | local cmd_opts="-h --help" |
---|
109 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
110 | return 0 |
---|
111 | ;; |
---|
112 | snapshot) |
---|
113 | local cmd_opts="-h --help" |
---|
114 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
115 | return 0 |
---|
116 | ;; |
---|
117 | sysdeps) |
---|
118 | local cmd_opts="-h --help --install" |
---|
119 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
120 | return 0 |
---|
121 | ;; |
---|
122 | tinderbox) |
---|
123 | local cmd_opts="-h --help -a --autogen -c --clean -n --no-network -o --output= -s --skip= -t --start-at= -D -C --try-checkout -N --no-poison -f --force" |
---|
124 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
125 | return 0 |
---|
126 | ;; |
---|
127 | uninstall) |
---|
128 | local cmd_opts="-h --help" |
---|
129 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
130 | return 0 |
---|
131 | ;; |
---|
132 | update) |
---|
133 | local cmd_opts="-h --help -s --skip= -t --start-at= --tags= -D --ignore-suggests" |
---|
134 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
135 | return 0 |
---|
136 | ;; |
---|
137 | updateone) |
---|
138 | local cmd_opts="-h --help -D" |
---|
139 | COMPREPLY=( $(compgen -W "${cmd_opts}" -- ${cur}) ) |
---|
140 | return 0 |
---|
141 | ;; |
---|
142 | *) |
---|
143 | ;; |
---|
144 | esac |
---|
145 | |
---|
146 | if [[ ${cur} == * ]] ; then |
---|
147 | COMPREPLY=( $(compgen -W "${opts}" ${cur}) ) |
---|
148 | return 0 |
---|
149 | fi |
---|
150 | } |
---|
151 | complete -F _sugar_jhbuild sugar-jhbuild |
---|