dotfiles/.zsh_functions/fuck.zsh

12 lines
204 B
Bash

function fuck {
local nth_last=${1:-1}
if [[ "$nth_last" =~ ^[0-9]+$ ]]; then
sudo $(fc -ln -$nth_last -$nth_last)
else
echo "Usage: fuck [offset]"
return 1
fi
}
alias please='fuck'