]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - shell-completion/bash/systemd-resolve
hwdb: Add accelerometer orientation quirk for the PoV TAB-P1006W-232-3G
[thirdparty/systemd.git] / shell-completion / bash / systemd-resolve
index f59482fe23c6bef227dd5ff775df604a0f326ebb..cd0231a6f497974ccb25b82fedd2a3e201228898 100644 (file)
@@ -1,9 +1,8 @@
 # systemd-resolve(1) completion                             -*- shell-script -*-
+# SPDX-License-Identifier: LGPL-2.1+
 #
 # This file is part of systemd.
 #
-# 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
 # the Free Software Foundation; either version 2.1 of the License, or
@@ -25,8 +24,8 @@ __contains_word () {
 }
 
 __get_interfaces(){
-        { cd /sys/class/net && echo *; } | \
-        while read -d' ' -r name; do
+        local name
+        for name in $(cd /sys/class/net && ls); do
                 [[ "$name" != "lo" ]] && echo "$name"
         done
 }
@@ -35,11 +34,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
@@ -50,6 +51,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