]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/dmesg
rev: be careful with close()
[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 --nopager
49 --raw
50 --syslog
51 --buffer-size
52 --ctime
53 --notime
54 --time-format
55 --userspace
56 --follow
57 --decode
58 --help
59 --version"
60 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
61 return 0
62 }
63 complete -F _dmesg_module dmesg