Created
November 18, 2010 18:13
-
-
Save bmaland/705368 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Prefix the previous line with "sudo " then execute it | |
| rerun-with-sudo () { | |
| LBUFFER="sudo !!" | |
| zle accept-line | |
| } | |
| zle -N rerun-with-sudo | |
| bindkey '\C-x\C-x' rerun-with-sudo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment