Skip to content

Instantly share code, notes, and snippets.

@djnugent
Created November 1, 2018 02:20
Show Gist options
  • Save djnugent/3a9dda24da381214b2153c3fb8800532 to your computer and use it in GitHub Desktop.
Save djnugent/3a9dda24da381214b2153c3fb8800532 to your computer and use it in GitHub Desktop.
Instead of !!
function please() {
cmd=$(history | cut -c 8- | tail -2 | head -1)
sudo $cmd
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment