28 lines
587 B
Bash

# dmesg(1) completion -*- shell-script -*-
_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
# ex: ts=4 sw=4 et filetype=sh