summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2021-01-21 18:37:40 +0000
committerLuca Boccassi <luca.boccassi@microsoft.com>2021-01-21 19:08:40 +0000
commit6faecbd353f9eb5aebe65a7159c5e61191e4330f (patch)
tree45b4cce2df2a31ae703806afcf0404e0669de676 /shell-completion
parentaf477139522060f6165221597ce6509dbde91791 (diff)
downloadsystemd-6faecbd353f9eb5aebe65a7159c5e61191e4330f.tar.gz
systemctl: add new option to mount image inside a running service namespace
Use the new DBUS method and follow the same pattern as the systemctl bind command.
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/systemctl.in2
-rw-r--r--shell-completion/zsh/_systemctl.in5
2 files changed, 6 insertions, 1 deletions
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index 7e99ef4bf3..6c5717d8cc 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.in
@@ -214,7 +214,7 @@ _systemctl () {
list-timers list-units list-unit-files poweroff
reboot rescue show-environment suspend get-default
is-system-running preset-all'
- [FILE]='link switch-root bind'
+ [FILE]='link switch-root bind mount-image'
[TARGETS]='set-default'
[MACHINES]='list-machines'
[LOG_LEVEL]='log-level'
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index c4ea78b3c1..03586de9fd 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -32,6 +32,7 @@
"list-dependencies:Show unit dependency tree"
"clean:Remove configuration, state, cache, logs or runtime data of units"
"bind:Bind mount a path from the host into a unit's namespace"
+ "mount-image:Mount an image from the host into a unit's namespace"
)
local -a machine_commands=(
@@ -383,6 +384,10 @@ done
_files
}
+(( $+functions[_systemctl_mount-image] )) || _systemctl_mount-image() {
+ _files
+ }
+
# no systemctl completion for:
# [STANDALONE]='daemon-reexec daemon-reload default
# emergency exit halt kexec list-jobs list-units