diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-10-30 10:39:22 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-10-30 10:39:22 +1300 |
commit | ee7396c3eaba483ff950579c99d849d4c719ecb5 (patch) | |
tree | a20c0b1a1c756e317dca35ae07641192c43df5f6 /sh/shrc.d | |
parent | Merge branch 'release/v1.70.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-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')
-rw-r--r-- | sh/shrc.d/sudo.sh | 5 |
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 "$@" } |