]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/setarch
rev: be careful with close()
[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 "$($1 --list)" -- $cur) )
14 return 0
15 fi
16 case $cur in
17 -*)
18 OPTS="
19 --32bit
20 --fdpic-funcptrs
21 --short-inode
22 --addr-compat-layout
23 --addr-no-randomize
24 --whole-seconds
25 --sticky-timeouts
26 --read-implies-exec
27 --mmap-page-zero
28 --3gb
29 --4gb
30 --uname-2.6
31 --verbose
32 --list
33 --help
34 --version
35 "
36 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
37 return 0
38 ;;
39 esac
40 compopt -o bashdefault
41 COMPREPLY=( $(compgen -c -- $cur) )
42 return 0
43 }
44 complete -F _setarch_module setarch