]> git.ipfire.org Git - thirdparty/util-linux.git/blob - bash-completion/dmesg
Merge branch 'wipefs/improvements' of https://github.com/t-8ch/util-linux
[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 --json
45 --kernel
46 --color
47 --level
48 --console-level
49 --noescape
50 --nopager
51 --raw
52 --syslog
53 --buffer-size
54 --ctime
55 --notime
56 --time-format
57 --userspace
58 --follow
59 --follow-new
60 --decode
61 --since
62 --until
63 --help
64 --version"
65 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
66 return 0
67 }
68 complete -F _dmesg_module dmesg