bash-completion: resolvectl: support 'log-level' command

This commit is contained in:
Yu Watanabe 2020-09-04 17:03:28 +09:00
parent bde4bc9bd2
commit 3605aae161
1 changed files with 4 additions and 0 deletions

View File

@ -48,6 +48,7 @@ _resolvectl() {
[DNSSEC]='dnssec'
[DNSOVERTLS]='dnsovertls'
[STANDALONE]='statistics reset-statistics flush-caches reset-server-features'
[LOG_LEVEL]='log-level'
)
local -A ARGS=(
[FAMILY]='tcp udp sctp'
@ -95,6 +96,9 @@ _resolvectl() {
elif __contains_word "$verb" ${VERBS[STATUS]}; then
comps="$interfaces"
elif __contains_word "$verb" ${VERBS[LOG_LEVEL]}; then
comps='debug info notice warning err crit alert emerg'
elif __contains_word "$verb" ${VERBS[FAMILY]}; then
for ((i++; i < COMP_CWORD; i++)); do
if __contains_word "${COMP_WORDS[i]}" ${ARGS[FAMILY]} &&