bashrc.d: added fuck

This commit is contained in:
Gregor Bückendorf 2018-12-16 14:29:22 +01:00
parent 3ea46d1f59
commit 77eae6eee4

9
.bashrc.d/fuck.sh Normal file
View file

@ -0,0 +1,9 @@
# https://twitter.com/liamosaur/status/506975850596536320
function fuck {
local nth_last=${1:-1}
if [[ "$nth_last" =~ ^[0-9]+$ ]]; then
sudo $(fc -ln -$nth_last -$nth_last)
fi
}
alias please='fuck'