]> git.ipfire.org Git - thirdparty/util-linux.git/blame - shell-completion/dmesg
bash-completion: sys-utils
[thirdparty/util-linux.git] / shell-completion / dmesg
CommitLineData
c6f8c3f5
SK
1_dmesg_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 '-F'|'--file')
9 compopt -o filenames
10 COMPREPLY=( $(compgen -f -- $cur) )
11 return 0
12 ;;
13 '-f'|'--facility')
14 COMPREPLY=( $(compgen -W "kern user mail daemon auth syslog lpr news" -- $cur) )
15 return 0
16 ;;
17 '-l'|'--level'|'-n'|'--console-level')
18 COMPREPLY=( $(compgen -W "emerg alert crit err warn notice info debug" -- $cur) )
19 return 0
20 ;;
21 '-s'|'--buffer-size')
22 COMPREPLY=( $(compgen -W "size" -- $cur) )
23 return 0
24 ;;
25 esac
26 OPTS="-C --clear
27 -c --read-clear
28 -D --console-off
29 -d --show-delta
30 -e --reltime
31 -E --console-on
32 -F --file
33 -f --facility
34 -H --human
35 -k --kernel
36 -L --color
37 -l --level
38 -n --console-level
39 -P --nopager
40 -r --raw
41 -S --syslog
42 -s --buffer-size
43 -T --ctime
44 -t --notime
45 -u --userspace
46 -w --follow
47 -x --decode
48 -h --help
49 -V --version"
50 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
51 return 0
52}
53complete -F _dmesg_module dmesg