aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/sudo.bash
blob: 41a97a9e2589ab81eb5c470cf4f7a90209135d05 (plain) (blame)
1
2
3
4
5
6
7
8
9
# 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 "$@"
    fi
}