]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/tunelp
su: use lib/pty-session.c code for --pty
[thirdparty/util-linux.git] / bash-completion / tunelp
1 _tunelp_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 '-i'|'--irq'|'-c'|'--chars')
9 COMPREPLY=( $(compgen -W "number" -- $cur) )
10 return 0
11 ;;
12 '-t'|'--time')
13 COMPREPLY=( $(compgen -W "milliseconds" -- $cur) )
14 return 0
15 ;;
16 '-w'|'--wait')
17 COMPREPLY=( $(compgen -W "microseconds" -- $cur) )
18 return 0
19 ;;
20 '-a'|'--abort'|'-o'|'--check-status'|'-C'|'--careful'|'-q'|'--print-irq')
21 COMPREPLY=( $(compgen -W "off on" -- $cur) )
22 return 0
23 ;;
24 '-h'|'--help'|'-V'|'--version')
25 return 0
26 ;;
27 esac
28 case $cur in
29 -*)
30 OPTS="--irq
31 --time
32 --chars
33 --wait
34 --abort
35 --check-status
36 --careful
37 --status
38 --reset
39 --print-irq
40 --help
41 --version"
42 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
43 return 0
44 ;;
45 esac
46 local IFS=$'\n'
47 compopt -o filenames
48 COMPREPLY=( $(compgen -f -- ${cur:-"/dev/lp"}) )
49 return 0
50 }
51 complete -F _tunelp_module tunelp