Created
September 4, 2016 19:03
-
-
Save mhaulo/cb52d5498f8ccfa58925031a3ed06c88 to your computer and use it in GitHub Desktop.
fuck! : bash alias to repeat last command using sudo
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
# Add the following line to .bashrc | |
# | |
# Usage: | |
# $ mkdir /some/dir/foo | |
# mkdir: cannot create directory ‘/some/dir/foo’: Permission denied | |
# $ fuck! | |
# [sudo] password for username: | |
# | |
alias fuck!='sudo $(history -p !!)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment