fish: functions: Switch from sudo to doas

This commit is contained in:
Sanchayan Maity 2024-02-24 12:22:22 +05:30
parent 9fa68e287a
commit 175620e9b4
Signed by: sanchayanmaity
GPG Key ID: 6F6A0609C12038F3
2 changed files with 4 additions and 4 deletions

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