Ticket #3555: sugar-jhbuild

File sugar-jhbuild, 1.9 KB (added by humitos, 12 years ago)

First steps...

Line 
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          *)
33        ;;
34    esac
35
36    if [[ ${cur} == * ]] ; then
37        COMPREPLY=( $(compgen -W "${opts}" ${cur}) )
38        return 0
39    fi
40}
41complete -F _sugar_jhbuild sugar-jhbuild