I've added the following alias
alias please='sudo $(fc -ln -1)'
So now,
~$ bash ./helloworld bash: ./helloworld: permission denied ~$ please Hello World!
Source twitter.com/zzaaho/status/11608251...
The previous command can be found in !!
alias please='sudo !!'
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!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I've added the following alias
So now,
Source twitter.com/zzaaho/status/11608251...
The previous command can be found in !!
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!