aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/sudo.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh/shrc.d/sudo.sh')
-rw-r--r--sh/shrc.d/sudo.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/sh/shrc.d/sudo.sh b/sh/shrc.d/sudo.sh
index a5883168..d9e30bc4 100644
--- a/sh/shrc.d/sudo.sh
+++ b/sh/shrc.d/sudo.sh
@@ -1,5 +1,8 @@
# Add the -H parameter to sudo(8) calls, always use the target user's $HOME
sudo() {
- [ "$1" != -v ] && set -- -H "$@"
+ case $1 in
+ -v) ;;
+ *) set -- -H "$@" ;;
+ esac
command sudo "$@"
}