shell-completion: systemctl switch-root verb

The completion is rudimentary (all files). I think this is OK since
this is used so rarely. But not having it proposed at all is annoying.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2015-04-02 22:54:35 -04:00 committed by zbyszek
parent b18d23d7ac
commit 7b742b3130
2 changed files with 6 additions and 1 deletions

View file

@ -160,7 +160,7 @@ _systemctl () {
reboot rescue show-environment suspend get-default
is-system-running'
[NAME]='snapshot'
[FILE]='link'
[FILE]='link switch-root'
[TARGETS]='set-default'
)

View file

@ -59,6 +59,7 @@
"reboot:Shut down and reboot the system"
"kexec:Shut down and reboot the system with kexec"
"exit:Ask for user instance termination"
"switch-root:Change root directory"
)
if (( CURRENT == 1 )); then
@ -297,6 +298,10 @@ done
_sd_unit_files
}
(( $+functions[_systemctl_switch-root] )) || _systemctl_switch-root() {
_files
}
# no systemctl completion for:
# [STANDALONE]='daemon-reexec daemon-reload default
# emergency exit halt kexec list-jobs list-units