From b571d063e4d9c3edd6fcfebc00dcb46668ebdded Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Tue, 26 Oct 2021 17:10:02 -0400 Subject: [PATCH] Use a more generic sudo command invocation --- home/fish/pls.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/fish/pls.fish b/home/fish/pls.fish index 9043cb8..35080d7 100644 --- a/home/fish/pls.fish +++ b/home/fish/pls.fish @@ -4,13 +4,13 @@ function pls set -l cmd "`"(string join " " -- $argv)"`" echo "I-It's not like I'm gonna run "$cmd" for you or a-anything! Baka >:C" >&2 # Send a notification on password prompt - if /usr/bin/sudo -vn 2>/dev/null + if command sudo -vn 2>/dev/null # nothing to do, user already authenticated else # throw a notification # notify-send -t 3000 -u critical -i ~/Downloads/harukablush.jpg -h "STRING:command:"$cmd "A-a command requires your p-password" (printf "I-I need your p-password to r-run the following c-command: %s" $cmd) end - /usr/bin/sudo $argv + command sudo $argv end function sudo