Compare commits

...

2 Commits

3 changed files with 6 additions and 4 deletions

View File

@ -0,0 +1,2 @@
abbr do doas
abbr sudo doas

View File

@ -1,3 +1,3 @@
function se --wraps=sudoedit --description 'alias se=sudoedit'
sudoedit $argv
function se --wraps=doasedit --description 'alias se=doasedit'
doasedit $argv
end

View File

@ -1,4 +1,4 @@
function systemctl --description 'Wraps privileged and user systemctl commands to use sudo when necessary' -w systemctl
function systemctl --description 'Wraps privileged and user systemctl commands to use doas when necessary' -w systemctl
set -l user_commands \
list-units list-unit-files list-jobs list-timers \
list-sockets list-dependencies list-machines \
@ -16,6 +16,6 @@ function systemctl --description 'Wraps privileged and user systemctl commands t
if contains -- --user $argv; or not contains -- $argv[1] $root_commands
command systemctl $argv
else
command sudo systemctl $argv
command doas systemctl $argv
end
end