systemd.plugin.zsh 820 B

12345678910111213141516171819202122
  1. user_commands=(
  2. list-units is-active status show help list-unit-files
  3. is-enabled list-jobs show-environment cat list-timers)
  4. sudo_commands=(
  5. start stop reload restart try-restart isolate kill
  6. reset-failed enable disable reenable preset mask unmask
  7. link load cancel set-environment unset-environment
  8. edit)
  9. for c in $user_commands; do; alias sc-$c="systemctl $c"; done
  10. for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done
  11. for c in $user_commands; do; alias scu-$c="systemctl --user $c"; done
  12. for c in $sudo_commands; do; alias scu-$c="systemctl --user $c"; done
  13. alias sc-enable-now="sc-enable --now"
  14. alias sc-disable-now="sc-disable --now"
  15. alias sc-mask-now="sc-mask --now"
  16. alias scu-enable-now="scu-enable --now"
  17. alias scu-disable-now="scu-disable --now"
  18. alias scu-mask-now="scu-mask --now"