]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - shell-completion/bash/systemd-resolve
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / shell-completion / bash / systemd-resolve
index 0c501c94057ff7104feaed49e24f16679d6895cd..18bcfbb06022396529d5ce6c943703ffdefe5cdb 100644 (file)
@@ -1,8 +1,9 @@
 # systemd-resolve(1) completion                             -*- shell-script -*-
+# SPDX-License-Identifier: LGPL-2.1+
 #
 # This file is part of systemd.
 #
-# Copyright 2016 Zbigniew Jędrzejewski-Szmek
+# Copyright © 2016 Zbigniew Jędrzejewski-Szmek
 #
 # systemd is free software; you can redistribute it and/or modify it
 # under the terms of the GNU Lesser General Public License as published by
@@ -35,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
-                             --service --openpgp --tlsa --statistics --reset-statistics
-                             --service-address=no --service-txt=no
-                             --cname=no --search=no --legend=no'
-                      [ARG]='-i --interface -p --protocol -t --type -c --class'
+               [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 --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
@@ -50,6 +53,21 @@ _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"
+                                ;;
+                        --set-dnsovertls)
+                                comps="no opportunistic"
+                                ;;
                 esac
                 COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
                 return 0