Created
November 14, 2012 17:23
-
-
Save AlexRezit/4073473 to your computer and use it in GitHub Desktop.
my sudo alias
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'from sys import argv | |
try: | |
command = argv[1] | |
print "sudo: %s: command not found" % command | |
except: | |
print """usage: sudo -h | -K | -k | -L | -V | |
usage: sudo -v [-AknS] [-g groupname|#gid] [-p prompt] [-u user name|#uid] | |
usage: sudo -l[l] [-AknS] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command] | |
usage: sudo [-AbEHknPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>] | |
usage: sudo -e [-AknS] [-C fd] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ..."""' > ~/.sudo.py | |
echo 'alias sudo="python ~/.sudo.py"' >> ~/.bash_profile && source ~/.bash_profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment