summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/zsh/_bootctl7
-rw-r--r--shell-completion/zsh/_systemctl.in6
2 files changed, 9 insertions, 4 deletions
diff --git a/shell-completion/zsh/_bootctl b/shell-completion/zsh/_bootctl
index 7d2453cc2c..0e1b0a5562 100644
--- a/shell-completion/zsh/_bootctl
+++ b/shell-completion/zsh/_bootctl
@@ -4,7 +4,10 @@
{
local -a _bootctl_cmds
_bootctl_cmds=(
- "status:Show current firmware and boot settings"
+ "status:Show status of installed systemd-boot and EFI variables"
+ "install:Install systemd-boot to the ESP and EFI variables"
+ "update:Update systemd-boot in the ESP and EFI variables"
+ "remove:Remove systemd-boot from the ESP and EFI variables"
)
if (( CURRENT == 1 )); then
_describe -t commands 'bootctl command' _bootctl_cmds || compadd "$@"
@@ -22,4 +25,6 @@
_arguments \
{-h,--help}'[Prints a short help text and exits.]' \
'--version[Prints a short version string and exits.]' \
+ '--path=[Path to the EFI System Partition (ESP)]:path:_directories' \
+ '--no-variables[Do not touch EFI variables]' \
'*::bootctl command:_bootctl_command'
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index e339066b83..17736de01c 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -93,9 +93,7 @@
__systemctl()
{
- local -a _modes
- _modes=("--user" "--system")
- systemctl ${words:*_modes} --full --no-legend --no-pager "$@"
+ systemctl $_sys_service_mgr --full --no-legend --no-pager "$@"
}
@@ -369,6 +367,8 @@ _job_modes() {
_values -s , "${_modes[@]}"
}
+local -a _modes; _modes=("--user" "--system")
+local _sys_service_mgr=${${words:*_modes}[(R)(${(j.|.)_modes})]:---system}
_arguments -s \
{-h,--help}'[Show help]' \
'--version[Show package version]' \