diff --git a/completions/sysctl b/completions/sysctl index 0ab37129..b3fa3fcc 100644 --- a/completions/sysctl +++ b/completions/sysctl @@ -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==