]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/dmesg
su: use lib/pty-session.c code for --pty
[thirdparty/util-linux.git] / bash-completion / dmesg
1
2 _dmesg_module()
3 {
4 local cur prev OPTS
5 COMPREPLY=()
6 cur="${COMP_WORDS[COMP_CWORD]}"
7 prev="${COMP_WORDS[COMP_CWORD-1]}"
8 case $prev in
9 '-F'|'--file')
10 local IFS=$'\n'
11 compopt -o filenames
12 COMPREPLY=( $(compgen -f -- $cur) )
13 return 0
14 ;;
15 '-f'|'--facility')
16 COMPREPLY=( $(compgen -W "kern user mail daemon auth syslog lpr news" -- $cur) )
17 return 0
18 ;;
19 '-l'|'--level'|'-n'|'--console-level')
20 COMPREPLY=( $(compgen -W "emerg alert crit err warn notice info debug" -- $cur) )
21 return 0
22 ;;
23 '-s'|'--buffer-size')
24 COMPREPLY=( $(compgen -W "size" -- $cur) )
25 return 0
26 ;;
27 '--time-format')
28 COMPREPLY=( $(compgen -W "delta reltime ctime notime iso" -- $cur) )
29 return 0
30 ;;
31 '-h'|'--help'|'-V'|'--version')
32 return 0
33 ;;
34 esac
35 OPTS="--clear
36 --read-clear
37 --console-off
38 --show-delta
39 --reltime
40 --console-on
41 --file
42 --facility
43 --human
44 --kernel
45 --color
46 --level
47 --console-level
48 --noescape
49 --nopager
50 --raw
51 --syslog
52 --buffer-size
53 --ctime
54 --notime
55 --time-format
56 --userspace
57 --follow
58 --decode
59 --help
60 --version"
61 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
62 return 0
63 }
64 complete -F _dmesg_module dmesg