# 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.
#
__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() {
local a b
- machinectl list --no-legend --no-pager | { while read a b; do echo " $a"; done; };
+ machinectl list --full --no-legend --no-pager | { while read a b; do echo " $a"; done; };
}
__get_env() {
--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
comps='no auto guest try-guest host try-host'
;;
--bind|--bind-ro)
- compopt -o nospace
- comps=$(compgen -S/ -A directory -- "$cur" )
+ compopt -o nospace -o filenames
+ comps=$(compgen -f -- "$cur" )
;;
--tmpfs)
compopt -o nospace
--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