dmesg: Adapt to versions returning long options.
This commit is contained in:
parent
fabf0e2d35
commit
3ccfe020a2
@ -8,17 +8,24 @@ _dmesg()
|
|||||||
_init_completion || return
|
_init_completion || return
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-s|-M|-N)
|
-h|--help|-V|--version|-s|--buffer-size|-M|-N)
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
-n)
|
-f|--facility)
|
||||||
|
COMPREPLY=( $( compgen -W 'kern user mail daemon auth syslog lpr
|
||||||
|
news' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
-l|--level|-n|--console-level)
|
||||||
COMPREPLY=( $( compgen -W '{1..8}' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '{1..8}' -- "$cur" ) )
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ $cur == -* ]]; then
|
if [[ $cur == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
|
local opts=$( _parse_help "$1" )
|
||||||
|
[[ $opts ]] || opts=$( _parse_usage "$1" )
|
||||||
|
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
} &&
|
} &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user