]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/setarch
bash-completion: Don't offer any more completions after help or version.
[thirdparty/util-linux.git] / bash-completion / setarch
1 _setarch_module()
2 {
3 local cur prev OPTS
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
8 '-h'|'--help'|'-V'|'--version')
9 return 0
10 ;;
11 esac
12 if [ $COMP_CWORD -eq 1 ]; then
13 COMPREPLY=( $(compgen -W "linux32 linux64 ppc32 ppc ppc64
14 ppc64pseries ppc64iseries i386
15 i486 i586 i686 athlon x86_64
16 ia64 parisc32 parisc parisc64
17 s390 s390x sparc sparc32bash
18 sparc32 sparc64 mips32 mips
19 mips64 alpha alphaev5 alphaev56
20 alphaev6 alphaev67" -- $cur) )
21 return 0
22 fi
23 case $cur in
24 -*)
25 OPTS="-v, --verbose
26 -R, --addr-no-randomize
27 -F, --fdpic-funcptrs
28 -Z, --mmap-page-zero
29 -L, --addr-compat-layout
30 -X, --read-implies-exec
31 -B, --32bit
32 -I, --short-inode
33 -S, --whole-seconds
34 -T, --sticky-timeouts
35 -3, --3gb
36 --4gb
37 --uname-2.6
38 -h, --help
39 -V, --version"
40 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
41 return 0
42 ;;
43 esac
44 compopt -o bashdefault
45 COMPREPLY=( $(compgen -c -- $cur) )
46 return 0
47 }
48 complete -F _setarch_module setarch