]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/pivot_root
su: use lib/pty-session.c code for --pty
[thirdparty/util-linux.git] / bash-completion / pivot_root
1 _pivot_root_module()
2 {
3 local cur prev
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 case $COMP_CWORD in
13 1|2)
14 local IFS=$'\n'
15 compopt -o filenames
16 COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
17 ;;
18 esac
19 return 0
20 }
21 complete -F _pivot_root_module pivot_root