fish: functions: Switch from sudo to doas
This commit is contained in:
parent
9fa68e287a
commit
175620e9b4
2 changed files with 4 additions and 4 deletions
|
@ -1,3 +1,3 @@
|
||||||
function se --wraps=sudoedit --description 'alias se=sudoedit'
|
function se --wraps=doasedit --description 'alias se=doasedit'
|
||||||
sudoedit $argv
|
doasedit $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -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 \
|
set -l user_commands \
|
||||||
list-units list-unit-files list-jobs list-timers \
|
list-units list-unit-files list-jobs list-timers \
|
||||||
list-sockets list-dependencies list-machines \
|
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
|
if contains -- --user $argv; or not contains -- $argv[1] $root_commands
|
||||||
command systemctl $argv
|
command systemctl $argv
|
||||||
else
|
else
|
||||||
command sudo systemctl $argv
|
command doas systemctl $argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue