Waffelson@lemmy.world to linuxmemes@lemmy.world · 2 years agoWhen you realized you forgot sudolemmy.worldimagemessage-square12linkfedilinkarrow-up17arrow-down11
arrow-up16arrow-down1imageWhen you realized you forgot sudolemmy.worldWaffelson@lemmy.world to linuxmemes@lemmy.world · 2 years agomessage-square12linkfedilink
minus-squareEsca@lemmy.onelinkfedilinkarrow-up1·2 years agoIsn’t this the same effect as just running ‘sudo !!’ ?
minus-squaresubtext@lemmy.worldlinkfedilinkarrow-up0·2 years agoAccording to this super user question, someone said that !! won’t work in a function, so you must use the fc -ln -1 command in a subshell instead. Note the response that says eval shouldn’t be used (not sure why)
minus-squareEsca@lemmy.onelinkfedilinkarrow-up1·2 years agoYeah but instead of a function you just make it an alias.
Isn’t this the same effect as just running ‘sudo !!’ ?
According to this super user question, someone said that
!!won’t work in a function, so you must use thefc -ln -1command in a subshell instead. Note the response that saysevalshouldn’t be used (not sure why)Yeah but instead of a function you just make it an alias.