Su : Add sudo for su -c.
This commit is contained in:
parent
2958eddb86
commit
3801872c05
|
@ -2,10 +2,17 @@
|
||||||
# Root by default.
|
# Root by default.
|
||||||
# Usage: s [USER]
|
# Usage: s [USER]
|
||||||
function s() {
|
function s() {
|
||||||
su - "${@}"
|
su - "${1}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Run something as root.
|
||||||
|
# Usage: sudo <COMMAND>
|
||||||
|
function sudo() {
|
||||||
|
su -c "${*}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function _complete_s() {
|
function _complete_s() {
|
||||||
_autocomplete "voronind" "dasha"
|
_autocomplete "voronind" "dasha"
|
||||||
}
|
}
|
||||||
complete -F _complete_s s
|
complete -F _complete_s s
|
||||||
|
complete -F _autocomplete_nested sudo
|
||||||
|
|
Loading…
Reference in a new issue