Skip to content

Instantly share code, notes, and snippets.

@michaelabon
Created January 10, 2014 00:33
Show Gist options
  • Save michaelabon/8344835 to your computer and use it in GitHub Desktop.
Save michaelabon/8344835 to your computer and use it in GitHub Desktop.
Forgot to sudo? Make sure your command runs.
bitch() {
if [[ $1 -eq "please" ]]
then
sudo $(fc -ln -1)
else
sudo "$@"
fi
}
bitch() {
if [[ $1 -eq "please" ]]
then
eval "sudo $(fc -ln -1)"
else
sudo "$@"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment