[LINK]='revert dns domain nta'
[RESOLVE]='llmnr mdns'
[DNSSEC]='dnssec'
+ [PRIVATEDNS]='privatedns'
[STANDALONE]='statistics reset-statistics flush-caches reset-server-features'
)
local -A ARGS=(
[FAMILY]='tcp udp sctp'
[RESOLVE]='yes no resolve'
[DNSSEC]='yes no allow-downgrade'
+ [PRIVATEDNS]='no opportunistic'
)
local interfaces=$( __get_interfaces )
comps=""
fi
- elif __contains_word "$verb" ${VERBS[LINK]} ${VERBS[RESOLVE]} ${VERBS[DNSSEC]}; then
+ elif __contains_word "$verb" ${VERBS[LINK]} ${VERBS[RESOLVE]} ${VERBS[DNSSEC]} ${VERBS[PRIVATEDNS]}; then
for ((i++; i < COMP_CWORD; i++)); do
if __contains_word "${COMP_WORDS[i]}" $interfaces &&
! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
comps=''
fi
+ elif __contains_word "$verb" ${VERBS[PRIVATEDNS]}; then
+ name=
+ for ((i++; i < COMP_CWORD; i++)); do
+ if __contains_word "${COMP_WORDS[i]}" ${ARGS[PRIVATEDNS]} &&
+ ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
+ name=${COMP_WORDS[i]}
+ break;
+ fi
+ done
+
+ if [[ -z $name ]]; then
+ comps=${ARGS[PRIVATEDNS]}
+ else
+ comps=''
+ fi
+
else
comps=''
fi