diff options
author | Chris Down <chris@chrisdown.name> | 2020-01-07 20:34:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-07 20:34:55 +0100 |
commit | bbfd9f513b294b9555643fe1e34133ab14632ca0 (patch) | |
tree | 28c903d287cdceb24d78068178fad08d94c2da93 /shell-completion/zsh/_systemctl.in | |
parent | boot: fix osrel parser (diff) | |
parent | zsh: Prepare for classifying systemctl commands (#14422) (diff) | |
download | systemd-bbfd9f513b294b9555643fe1e34133ab14632ca0.tar.xz systemd-bbfd9f513b294b9555643fe1e34133ab14632ca0.zip |
Merge pull request #14423 from danielshahaf/zsh-add-missing-completions
zsh: Add missing completions
Diffstat (limited to 'shell-completion/zsh/_systemctl.in')
-rw-r--r-- | shell-completion/zsh/_systemctl.in | 72 |
1 files changed, 56 insertions, 16 deletions
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index 67c1c2b327..18663fca2e 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -3,8 +3,8 @@ (( $+functions[_systemctl_commands] )) || _systemctl_commands() { - local -a _systemctl_cmds - _systemctl_cmds=( + local -a unit_commands=( + # Unit Commands "list-sockets:List sockets" "list-timers:List timers" "list-units:List units" @@ -16,9 +16,6 @@ "try-restart:Restart one or more units if active" "reload-or-restart:Reload one or more units if possible, otherwise start or restart" "force-reload:Reload one or more units if possible, otherwise restart if active" - "hibernate:Hibernate the system" - "hybrid-sleep:Hibernate and suspend the system" - "suspend-then-hibernate:Suspend the system for a period of time, and then hibernate it" "try-reload-or-restart:Reload one or more units if possible, otherwise restart if active" "isolate:Start one unit and stop all others" "kill:Send signal to processes of a unit" @@ -27,32 +24,64 @@ "status:Show runtime status of one or more units" "show:Show properties of one or more units/jobs or the manager" "cat:Show the source unit files and drop-ins" + "set-property:Sets one or more properties of a unit" + "help:Show documentation for specified units" "reset-failed:Reset failed state for all, one, or more units" + "list-dependencies:Show unit dependency tree" + "clean:Remove configuration, state, cache, logs or runtime data of units" + ) + + local -a machine_commands=( + # Machine Commands + "list-machines:List the host and all running local containers" + ) + + local -a unit_file_commands=( + # Unit File Commands "list-unit-files:List installed unit files" "enable:Enable one or more unit files" "disable:Disable one or more unit files" - "add-wants:Add Wants= dependencies to a unit" - "add-requires:Add Requires= dependencies to a unit" "reenable:Reenable one or more unit files" "preset:Enable/disable one or more unit files based on preset configuration" "preset-all:Enable/disable all unit files based on preset configuration" - "set-default:Set the default target" - "get-default:Query the default target" - "edit:Edit one or more unit files" - "is-system-running:Query overall status of the system" - "help:Show documentation for specified units" - "list-dependencies:Show unit dependency tree" + "is-enabled:Check whether unit files are enabled" "mask:Mask one or more units" "unmask:Unmask one or more units" "link:Link one or more units files into the search path" - "is-enabled:Check whether unit files are enabled" + "revert:Revert unit files to their vendor versions" + "add-wants:Add Wants= dependencies to a unit" + "add-requires:Add Requires= dependencies to a unit" + "set-default:Set the default target" + "get-default:Query the default target" + "edit:Edit one or more unit files" + ) + + local -a job_commands=( + # Job Commands "list-jobs:List jobs" "cancel:Cancel all, one, or more jobs" + ) + + local -a environment_commands=( + # Environment Commands "show-environment:Dump environment" "set-environment:Set one or more environment variables" "unset-environment:Unset one or more environment variables" + "import-environment:Import environment variables set on the client" + ) + + local -a manager_state_commands=( + # Manager State Commands "daemon-reload:Reload systemd manager configuration" "daemon-reexec:Reexecute systemd manager" + "log-level:Get or set the log level" + "log-target:Get or set the log target" + "service-watchdogs:Get or set the state of software watchdogs" + ) + + local -a system_commands=( + # System Commands + "is-system-running:Query overall status of the system" "default:Enter system default mode" "rescue:Enter system rescue mode" "emergency:Enter system emergency mode" @@ -63,8 +92,19 @@ "kexec:Shut down and reboot the system with kexec" "exit:Ask for user instance termination" "switch-root:Change root directory" - "revert:Revert unit files to their vendor versions" - "set-property:Sets one or more properties of a unit" + "hibernate:Hibernate the system" + "hybrid-sleep:Hibernate and suspend the system" + "suspend-then-hibernate:Suspend the system for a period of time, and then hibernate it" + ) + + local -a _systemctl_cmds=( + "${unit_commands[@]}" + "${machine_commands[@]}" + "${unit_file_commands[@]}" + "${job_commands[@]}" + "${environment_commands[@]}" + "${manager_state_commands[@]}" + "${system_commands[@]}" ) if (( CURRENT == 1 )); then |