Show ContentDrew Belloc@ani.socialEnglish31·5 months agoFuck will always be my alias to run sudo with the last command
Show Contenthenfredemars@infosec.pubEnglish29·5 months agoThere’s a project that automatically corrects common errors with your last command as well with the same name.
Show Contentdouble_quack@lemm.eeEnglish15·5 months agoIt sounds fun and “magic” but it is hella scary to blindly run some “fixed” command
Show Contenthenfredemars@infosec.pubEnglish14·5 months agoI believe it does take confirmation via the ENTER key.
Show Contentcactopuses@lemm.ee10·5 months agoIt does! It’s usually pretty good at figuring it ont to. Though I only use it with non-destructive commands
Show ContentJustAnotherKay@lemmy.world7·5 months agoBetween the fuck utility and this alias idea, when I set up my next box I’m absolutely aliasing “fuck off” for sudo the last command and “please” for sudo itself
Show Contentanytimesoon@feddit.uk2·5 months agoHow do you alias the last command? My aliases are all hard coded. I had no idea you could send a variable to an alias
Show ContentOmega@sh.itjust.works2·5 months agoProbably with !! (!n will be the command corresponding to the number n in your history, !! is shorthand for the last command)
Fuck will always be my alias to run sudo with the last command
There’s a project that automatically corrects common errors with your last command as well with the same name.
It sounds fun and “magic” but it is hella scary to blindly run some “fixed” command
I believe it does take confirmation via the ENTER key.
It does! It’s usually pretty good at figuring it ont to. Though I only use it with non-destructive commands
Ok i loved it
Shorthand that works anywhere:
sudo !!
Between the fuck utility and this alias idea, when I set up my next box I’m absolutely aliasing “fuck off” for sudo the last command and “please” for sudo itself
Yup I’m stealing that lol
“Fucking” would be funnier and more grammatically correct.
How do you alias the last command? My aliases are all hard coded. I had no idea you could send a variable to an alias
Probably with
!!
(!n
will be the command corresponding to the number n in your history,!!
is shorthand for the last command)