3 zstyle ":completion:*:descriptions" format "%B%d%b"
6 local context state line ret=1
10 local -a _1st_arguments
12 'help:print the help message'
13 {update,pull}':update all repos'
14 'compile:compile the source code'
15 'clean:clean all repos'
17 'update-maps:download the latest version of all official maps from the autobuild server'
18 'compile-map:compile the specified maps'
19 'serverbench:run the server benchmark'
20 'fix_upstream_rebase:fix upstream rebase'
21 'fix_config:fix .git/config'
22 'keygen:generate ssh key for repo access if one does not exist yet'
23 {checkout,switch}':checkout a specific branch in repos where it exists and default branch elsewhere'
24 'branch:create a branch in a repo (asks for repo)'
25 {push,commit}':commit and push changes'
26 {each,foreach}':run a command in each repo'
27 'grep:run "git grep" in all repos'
32 '*:: :->args' && ret=0
37 _describe -t actions 'commands' _1st_arguments
44 # choose version and autocomplete cvars
45 # possible TODO: check for OS and adapt to it
47 '1:Version:(sdl dedicated)' && ret=0
52 '1:Version:(sdl dedicated)' \
53 "-0[don't use precompiled d0_blind_id]" \
54 "-1[don't compile d0_blind_id]" \
55 '-c[clean all before building]' \
56 '-qc[clean QuakeC binaries]' \
58 '-r[build in release mode]' \
60 '-p[build in profile mode]' && ret=0
64 _files -W "(data/xonotic-maps.pk3dir/maps)" -g "*.map(:r)" && ret=0
71 '-u[go to upstream]' \
72 '-U[go to upstream and fetch master]' \
74 '-r[remove untracked files]' \
77 '--reclone[set all the other flags (effectively a reclone)]' && ret=0
82 "-N[reset git config for each repo]" \
83 '-l[find the best mirror in the specified location]' \
85 {-p,-s}'[set ssh as push protocol and find the best mirror]' \
87 '-g[set git as push protocol and find the best mirror]' \
89 '-h[set http as push protocol and find the best mirror]' && ret=0