forgot to sudo? use 'fuck'

We all forget to sudo when we need to:

But how many of you have fuck at your disposal?

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