summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-01-10 22:39:04 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-01-10 23:20:52 +0900
commit14aeb7ce7fd7421e9b7c28e2c8b1babdf6bdd0a8 (patch)
treeea3fed4cda2d619895755665a62baf9d00d9a6c9 /shell-completion
parent86b4188d5ef7fe284fa9f8c92f6e538c3e565834 (diff)
downloadsystemd-14aeb7ce7fd7421e9b7c28e2c8b1babdf6bdd0a8.tar.gz
bash-completion: resolve: add missing options
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/systemd-resolve20
1 files changed, 17 insertions, 3 deletions
diff --git a/shell-completion/bash/systemd-resolve b/shell-completion/bash/systemd-resolve
index 3f789e80d0..ecd1ebad54 100644
--- a/shell-completion/bash/systemd-resolve
+++ b/shell-completion/bash/systemd-resolve
@@ -36,11 +36,13 @@ _systemd-resolve() {
local i comps
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local -A OPTS=(
- [STANDALONE]='-h --help --version -4 -6
+ [STANDALONE]='-h --help --version --no-pager -4 -6
--service --openpgp --tlsa --status --statistics
--reset-statistics --service-address=no --service-txt=no
- --cname=no --search=no --legend=no'
- [ARG]='-i --interface -p --protocol -t --type -c --class'
+ --cname=no --search=no --legend=no --flush-caches
+ --reset-server-features --revert'
+ [ARG]='-i --interface -p --protocol -t --type -c --class --raw
+ --set-dns --set-domain --set-llmnr --set-mdns --set-dnssec --set-nta'
)
if __contains_word "$prev" ${OPTS[ARG]}; then
@@ -51,6 +53,18 @@ _systemd-resolve() {
--protocol|-p|--type|-t|--class|-c)
comps=$( systemd-resolve --legend=no "$prev" help; echo help )
;;
+ --raw)
+ comps="payload packet"
+ ;;
+ --set-dns|--set-domain|--set-nta)
+ comps=""
+ ;;
+ --set-llmnr|--set-mdns)
+ comps="yes no resolve"
+ ;;
+ --set-dnssec)
+ comps="yes no allow-downgrade"
+ ;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0