summaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-10-11 21:10:45 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-10-11 21:10:45 +0300
commita6c9c614d4f55b5cfa0387b68e98d4e609b1f2af (patch)
treeb3958d30abcd012c57195f2c7f04e226075bb26a /completions
parent049b60ec61bebfd82e88eba3bc1df6fc138c38e5 (diff)
downloadbash-completion-a6c9c614d4f55b5cfa0387b68e98d4e609b1f2af.tar.gz
dmesg: New completion.
Diffstat (limited to 'completions')
-rw-r--r--completions/util-linux25
1 files changed, 25 insertions, 0 deletions
diff --git a/completions/util-linux b/completions/util-linux
index 6243a4d9..6246b118 100644
--- a/completions/util-linux
+++ b/completions/util-linux
@@ -116,6 +116,31 @@ _ionice()
} &&
complete -F _ionice ionice
+have dmesg &&
+_dmesg()
+{
+ [[ $OSTYPE == *solaris* ]] && return # no args there
+
+ local cur prev words cword
+ _init_completion || return
+
+ case $prev in
+ -s|-M|-N)
+ return
+ ;;
+ -n)
+ COMPREPLY=( $( compgen -W '{1..8}' -- "$cur" ) )
+ return
+ ;;
+ esac
+
+ if [[ $cur == -* ]]; then
+ COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
+ return
+ fi
+} &&
+complete -F _dmesg dmesg
+
# Local variables:
# mode: shell-script
# sh-basic-offset: 4