]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn-completion: implementation of shell completion of --notify-ready (#3679)
authorAlessandro Puccetti <alessandro@kinvolk.io>
Fri, 8 Jul 2016 15:44:20 +0000 (17:44 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 8 Jul 2016 15:44:20 +0000 (17:44 +0200)
Relative to: https://github.com/systemd/systemd/pull/3474

shell-completion/bash/systemd-nspawn
shell-completion/zsh/_systemd-nspawn

index 0cf249d8cedabd0ef7bdc6b58e08ab1e8a1cec10..ea4a5e1f43e69f8a5bcb26f69128cdcd3bfb6c2c 100644 (file)
@@ -60,7 +60,8 @@ _systemd_nspawn() {
                       [ARG]='-D --directory -u --user --uuid --capability --drop-capability --link-journal --bind --bind-ro -M --machine
                              -S --slice --setenv -Z --selinux-context -L --selinux-apifs-context --register --network-interface --network-bridge
                              --personality -i --image --tmpfs --volatile
-                             --network-macvlan --kill-signal --template'
+                             --network-macvlan --kill-signal --template
+                             --notify-ready'
         )
 
         _init_completion || return
@@ -139,6 +140,10 @@ _systemd_nspawn() {
                                 _signals
                                 return
                         ;;
+                        --notify-ready)
+                                comps='yes no'
+                                return
+                        ;;
                 esac
                 COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
                 return 0
index 3e0f667909ae5ef3983c2cb6950cca01ca957dde..77b2e7cd7c6b487069c413895107ac970a9041c2 100644 (file)
@@ -46,4 +46,5 @@ _arguments \
     '--keep-unit[Instead of creating a transient scope unit to run the container in, simply register the service or scope unit systemd-nspawn has been invoked in with systemd-machined(8).]' \
     '--personality=[Control the architecture ("personality") reported by uname(2) in the container.]:architecture:(x86 x86-64)' \
     '--volatile=[Run the system in volatile mode.]:volatile:(no yes state)' \
+    "--notify-ready=[Control when the ready notification is sent]:options:(yes no)" \
     '*:: : _normal'