My personal favorite is:
alias fuck='sudo $(fc -nl -1)'
Be very careful with this. alias fuck='sudo $(fc -nl -1)'
Be very careful with this. function fuckgit
rm -rf /tmp/fuckgit/
git clone --no-checkout (git config --get remote.origin.url) /tmp/fuckgit/
rm -rf .git/
mv /tmp/fuckgit/.git .
rm -rf /tmp/fuckgit/
endI looked at thefuck but it didn't seem to do anything I needed.
shopt -s histverify histreedit
Bash will let you then confirm the actual command it's going to run: sudo !!