]>
Commit | Line | Data |
---|---|---|
c6f8c3f5 SK |
1 | _unshare_module() |
2 | { | |
d4f9b8d7 | 3 | local cur prev OPTS |
c6f8c3f5 SK |
4 | COMPREPLY=() |
5 | cur="${COMP_WORDS[COMP_CWORD]}" | |
d4f9b8d7 VS |
6 | prev="${COMP_WORDS[COMP_CWORD-1]}" |
7 | case $prev in | |
d092911b SK |
8 | '--propagation') |
9 | COMPREPLY=( $(compgen -W "slave shared private unchanged" -- $cur) ) | |
10 | return 0 | |
11 | ;; | |
12 | '-s'|'--setgroups') | |
13 | COMPREPLY=( $(compgen -W "allow deny" -- $cur) ) | |
14 | return 0 | |
15 | ;; | |
d4f9b8d7 VS |
16 | '-h'|'--help'|'-V'|'--version') |
17 | return 0 | |
18 | ;; | |
19 | esac | |
c6f8c3f5 SK |
20 | case $cur in |
21 | -*) | |
0d5b9b8a VS |
22 | OPTS="--mount |
23 | --uts | |
24 | --ipc | |
25 | --net | |
26 | --pid | |
27 | --user | |
d092911b | 28 | --cgroup |
be7df01a | 29 | --time |
d092911b | 30 | --fork |
8e8f0fa5 | 31 | --kill-child |
e79f20f5 | 32 | --keep-caps |
d092911b | 33 | --mount-proc |
a1790d26 | 34 | --map-current-user |
d092911b SK |
35 | --map-root-user |
36 | --propagation | |
37 | --setgroups | |
0d5b9b8a | 38 | --help |
bf8834d4 LV |
39 | --version |
40 | --root | |
f0af42b5 | 41 | --wd |
be7df01a AR |
42 | --monotonic |
43 | --boottime | |
f0af42b5 LV |
44 | --setuid |
45 | --setgid" | |
c6f8c3f5 SK |
46 | COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) |
47 | return 0 | |
48 | ;; | |
49 | esac | |
50 | compopt -o bashdefault | |
51 | COMPREPLY=( $(compgen -c -- $cur) ) | |
52 | return 0 | |
53 | } | |
54 | complete -F _unshare_module unshare |