diff options
Diffstat (limited to 'bash/bashrc.d/sudo.bash')
-rw-r--r-- | bash/bashrc.d/sudo.bash | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bash/bashrc.d/sudo.bash b/bash/bashrc.d/sudo.bash index 5bb8906a..d6d91d12 100644 --- a/bash/bashrc.d/sudo.bash +++ b/bash/bashrc.d/sudo.bash @@ -1,8 +1,7 @@ # Add the -H parameter to sudo(8) calls, always use the target user's $HOME sudo() { - if [[ $1 == -v ]] ; then - command sudo "$@" - else - command sudo -H "$@" + if [[ $1 != -v ]] ; then + set -- -H "$@" fi + command sudo "$@" } |