Favourite thing in my .bashrc still remains:
alias fuck='sudo $(history -p \!\!)'

(repost of a tweet from 2014)

An even better implementation that works with both bash and zsh is
alias fuck='sudo $(fc -ln -1)'
credit: https://twitter.com/k_vladimiroff/status/507091773601370112?s=20&t=v3aZ5pvvZw35basQ5S8WKw
Kiril Ⅴladimirov on Twitter

“@PaGrom alias fuck='sudo $(fc -ln -1)' works both with bash and zsh, though :) @liamosaur”

Twitter
@liamo @xssfox I use https://github.com/nvbn/thefuck, which handles typos as well as not being root
GitHub - nvbn/thefuck: Magnificent app which corrects your previous console command.

Magnificent app which corrects your previous console command. - nvbn/thefuck

GitHub
@liamo there's a tool called thefuck that does the same thing your oneliner does, plus so much more (typo corrections etc). problem is that setting it up is a really poopy experience (at least to me).
@huskee 😉
@liamo wow, this is my ultimate enbysplaining moment...
@liamo note to self: do research before speakin :(

@liamo I have alias ffs=sudo so that to fix the same mistake I can type:

ffs !!