]> git.pld-linux.org Git - packages/bash-completion.git/blob - builder.bash-completion
- save something
[packages/bash-completion.git] / builder.bash-completion
1 # builder(1) completion
2
3 _builder()
4 {
5         local cur prev first
6
7         COMPREPLY=()
8         cur=`_get_cword`
9         prev=${COMP_WORDS[COMP_CWORD-1]}
10
11         case "$prev" in
12                 -@(g|--get))
13                         _filedir
14                         return 0
15                         ;;
16                 --with|--without)
17                         ./builder --show-avail-bconds automake.spec
18                         return 0
19                         ;;
20         esac
21
22         if [[ "$cur" == -* ]]; then
23                 COMPREPLY=( $( compgen -W '
24                         -5 -a5 -n5 -D -V -a -b -ba -bb -bp -bc -bi -bl -bs -B -c -cf -d -g
25                         -h -l -m -nc -ncs -nd -nm -nu -ns -ns0 -nn -ske -q -r -A -R -RB
26                         -FRB -sd -sdp -sf -sp -su -T -Tvs -Ts -Tv -Tp -tt -ir -v -u -un
27                         -U -Upi -np
28                         --with --without
29                 ' -- $cur ) )
30         else
31                 # find which specfile to use
32                 specfile=
33                 for (( i=1; i < COMP_CWORD; i++ )); do
34                         if [[ "${COMP_WORDS[i]}" == -@(?(build)file|f) ]]; then
35                                 specfile=${COMP_WORDS[i+1]}
36                                 break
37                         fi
38                 done
39                 [ ! -f $specfile ] && return 0
40         fi
41
42         return 0
43 }
44 #complete -F _builder builder
This page took 0.032414 seconds and 4 git commands to generate.