sysctl: Try parsing options from help before usage
This commit is contained in:
parent
1d9e705639
commit
e9fe2d9f7b
@ -13,7 +13,9 @@ _sysctl()
|
||||
esac
|
||||
|
||||
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" ) )
|
||||
else
|
||||
local suffix=
|
||||
[[ $prev == -w ]] && suffix==
|
||||
|
Loading…
x
Reference in New Issue
Block a user