aboutsummaryrefslogtreecommitdiff
path: root/sh/shrc.d/sudo.sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-10-30 10:39:22 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-10-30 10:39:22 +1300
commitee7396c3eaba483ff950579c99d849d4c719ecb5 (patch)
treea20c0b1a1c756e317dca35ae07641192c43df5f6 /sh/shrc.d/sudo.sh
parentMerge branch 'release/v1.70.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-1.71.0.tar.gz (sig)
dotfiles-1.71.0.zip
Merge branch 'release/v1.71.0'v1.71.0
* release/v1.71.0: Bump VERSION Documented the special install-conf target Respect completion-ignore-case in custom functions Use case statement for sudo -v switching
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 "$@"
}