3 ms·
My personal favorite is: alias fuck='sudo $(fc -nl -1)' Be very careful with this.
by mulmen 9y ago
My personal favorite is:
alias fuck='sudo $(fc -nl -1)'
Be very careful with this.
- epse 9y agoWhat about the actual program thefuck? It can fix more than just sudo, and asks you to confirm
- ben509 9y agoOr make history work for you: shopt -s histverify histreedit Bash will let you then confirm the actual command it's going to run: sudo !!
- mulmen 9y agoI use zsh and I don't know what shopt is. That's two commands and !! doesn't work in aliases.
- StavrosK 9y agoHere's one of my aliases for you: 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/ end
- oldgun 9y agoI think you can try this. https://github.com/nvbn/thefuck https://github.com/nvbn/thefuck