systemd.plugin.zsh 820 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 list-timers)
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
13
14
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
Juraj Fiala's avatar
Juraj Fiala committed
15
16
17
18

alias sc-enable-now="sc-enable --now"
alias sc-disable-now="sc-disable --now"
alias sc-mask-now="sc-mask --now"
19
20
21
22

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