]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/unshare
su: use lib/pty-session.c code for --pty
[thirdparty/util-linux.git] / bash-completion / unshare
CommitLineData
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
SK
28 --cgroup
29 --fork
8e8f0fa5 30 --kill-child
e79f20f5 31 --keep-caps
d092911b 32 --mount-proc
a1790d26 33 --map-current-user
d092911b
SK
34 --map-root-user
35 --propagation
36 --setgroups
0d5b9b8a 37 --help
bf8834d4
LV
38 --version
39 --root
f0af42b5
LV
40 --wd
41 --setuid
42 --setgid"
c6f8c3f5
SK
43 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
44 return 0
45 ;;
46 esac
47 compopt -o bashdefault
48 COMPREPLY=( $(compgen -c -- $cur) )
49 return 0
50}
51complete -F _unshare_module unshare