I've added the following alias
alias please='sudo $(fc -ln -1)'
~$ bash ./helloworld
bash: ./helloworld: permission denied
If only there were a way to change 'permission denied' to 'ask nicely'!
I can say that I've successfully wasted an hour looking to see if this was possible!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.