]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - shell-completion/bash/systemd-nspawn
Merge pull request #17549 from yuwata/tiny-fixes
[thirdparty/systemd.git] / shell-completion / bash / systemd-nspawn
index d263fd5dd93b0b936fd7d9473a49ffea336a4cd6..ebd97a9de1b683205050814a8e54c53453ad2276 100644 (file)
@@ -1,5 +1,5 @@
 # systemd-nspawn(1) completion                  -*- shell-script -*-
-# SPDX-License-Identifier: LGPL-2.1+
+# SPDX-License-Identifier: LGPL-2.1-or-later
 #
 # This file is part of systemd.
 #
@@ -30,7 +30,7 @@ __get_users() {
 
 __get_slices() {
     local a b
-    systemctl list-units -t slice --no-legend --no-pager | { while read a b; do echo " $a"; done; };
+    systemctl list-units -t slice --no-legend --no-pager --plain | { while read a b; do echo " $a"; done; };
 }
 
 __get_machines() {
@@ -71,7 +71,7 @@ _systemd_nspawn() {
                       --pivot-root --property --private-users --network-namespace-path --network-ipvlan
                       --network-veth-extra --network-zone -p --port --system-call-filter --overlay --overlay-ro
                       --settings --rlimit --hostname --no-new-privileges --oom-score-adjust --cpu-affinity
-                      --resolv-conf --timezone'
+                      --resolv-conf --timezone --root-hash-sig'
     )
 
     _init_completion || return
@@ -183,6 +183,10 @@ _systemd_nspawn() {
             --timezone)
                 comps=$( systemd-nspawn --timezone=help 2>/dev/null )
                 ;;
+            --root-hash-sig)
+                compopt -o nospace
+                comps=$( compgen -A file -- "$cur" )
+                ;;
         esac
         COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
         return 0