mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
bfec31666a
* Order systemctl commands alphabetically Simplifying the plugin maintenance. Signed-off-by: Petr Šabata <contyk@redhat.com> * Include the latest systemctl commands Based on systemd-233. I'm still keeping the old, now unsupported commands for backwards compatibility as well. Signed-off-by: Petr Šabata <contyk@redhat.com> * Add daemon-reload (#3701) Closes #3701 Co-authored-by: Javier Tia <javier.tia@gmail.com>
75 lines
1.2 KiB
Bash
75 lines
1.2 KiB
Bash
user_commands=(
|
|
cat
|
|
get-default
|
|
help
|
|
is-active
|
|
is-enabled
|
|
is-failed
|
|
is-system-running
|
|
list-dependencies
|
|
list-jobs
|
|
list-sockets
|
|
list-timers
|
|
list-unit-files
|
|
list-units
|
|
show
|
|
show-environment
|
|
status)
|
|
|
|
sudo_commands=(
|
|
add-requires
|
|
add-wants
|
|
cancel
|
|
daemon-reexec
|
|
daemon-reload
|
|
default
|
|
disable
|
|
edit
|
|
emergency
|
|
enable
|
|
halt
|
|
hibernate
|
|
hybrid-sleep
|
|
import-environment
|
|
isolate
|
|
kexec
|
|
kill
|
|
link
|
|
list-machines
|
|
load
|
|
mask
|
|
poweroff
|
|
preset
|
|
preset-all
|
|
reboot
|
|
reenable
|
|
reload
|
|
reload-or-restart
|
|
reset-failed
|
|
rescue
|
|
restart
|
|
revert
|
|
set-default
|
|
set-environment
|
|
set-property
|
|
start
|
|
stop
|
|
suspend
|
|
switch-root
|
|
try-reload-or-restart
|
|
try-restart
|
|
unmask
|
|
unset-environment)
|
|
|
|
for c in $user_commands; do; alias sc-$c="systemctl $c"; done
|
|
for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done
|
|
for c in $user_commands; do; alias scu-$c="systemctl --user $c"; done
|
|
for c in $sudo_commands; do; alias scu-$c="systemctl --user $c"; done
|
|
|
|
alias sc-enable-now="sc-enable --now"
|
|
alias sc-disable-now="sc-disable --now"
|
|
alias sc-mask-now="sc-mask --now"
|
|
|
|
alias scu-enable-now="scu-enable --now"
|
|
alias scu-disable-now="scu-disable --now"
|
|
alias scu-mask-now="scu-mask --now"
|