systemd.plugin.zsh 549 Bytes
Newer Older
1
2
user_commands=(
  list-units is-active status show help list-unit-files
3
  is-enabled list-jobs show-environment cat)
4
5
6
7

sudo_commands=(
  start stop reload restart try-restart isolate kill
  reset-failed enable disable reenable preset mask unmask
8
9
  link load cancel set-environment unset-environment
  edit)
10
11
12

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
Juraj Fiala's avatar
Juraj Fiala committed
13
14
15
16

alias sc-enable-now="sc-enable --now"
alias sc-disable-now="sc-disable --now"
alias sc-mask-now="sc-mask --now"