We all forget to sudo when we need to:
But how many of you have fuck
at your disposal?
Favourite thing in my .bashrc remains:
— Liam O (@liamosaur) September 3, 2014
alias fuck='sudo $(history -p \!\!)' pic.twitter.com/gCRF9RLvHL
How
bash
alias fuck='sudo $(history -p \!\!)' |
zsh
alias fuck='sudo $(fc -ln -1)' |
fish
alias fuck='eval sudo $history[1]' |
thefuck
A command line tool that corrects the previous console command, inspired by @liamosaur‘s tweet.
It does much more then adding sudo
, take a look:
Installation is as easy as:
$ pip install thefuck |
And like most good things nowadays, it’s hosted on GitHub: nvbn/tehfuck