]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/raw
su: use lib/pty-session.c code for --pty
[thirdparty/util-linux.git] / bash-completion / raw
1 _raw_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 $cur in
13 -*)
14 local OPTS
15 OPTS="--query --all --help --version"
16 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
17 return 0
18 ;;
19 esac
20 COMPREPLY=( $(compgen -W "$(for I in /dev/raw/*; do if [ -e $I ]; then echo $I; fi; done)" -- $cur) )
21 return 0
22 }
23 complete -F _raw_module raw