Su : Sudo now runc cmd as a normal user if su binary is not available.
This commit is contained in:
parent
b0953217e8
commit
859121ff85
|
@ -5,10 +5,15 @@ function s() {
|
|||
su - ${1}
|
||||
}
|
||||
|
||||
# Run something as root.
|
||||
# Run something as root. Runs command as a current user if su is not available.
|
||||
# Usage: sudo <COMMAND>
|
||||
function sudo() {
|
||||
if command -v su; then
|
||||
su -c "$(echo ${*} | tr '\n' ' ')"
|
||||
else
|
||||
${*}
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
function _complete_s() {
|
||||
|
|
Loading…
Reference in a new issue