obnomus@lemmy.ml to linuxmemes@lemmy.worldEnglish · 1 day agoNoicelemmy.mlimagemessage-square73linkfedilinkarrow-up1409arrow-down19
arrow-up1400arrow-down1imageNoicelemmy.mlobnomus@lemmy.ml to linuxmemes@lemmy.worldEnglish · 1 day agomessage-square73linkfedilink
minus-squareCaveman@lemmy.worldlinkfedilinkarrow-up131·1 day agoYou can also just do a sudo !! the !! is a shorthand for whatever you tried to run previously.
minus-squarelefixxx@lemmy.worldlinkfedilinkarrow-up3·13 hours agowish i could alias that alias ffs=“sudo !!”
minus-squaretimbuck2themoon@sh.itjust.workslinkfedilinkEnglisharrow-up3·9 hours agoalias ffs='sudo $(history -p !!)'
minus-squareTedZanzibar@feddit.uklinkfedilinkEnglisharrow-up1·8 hours agoJust to confirm: I tried this, it works.
minus-squareCaveman@lemmy.worldlinkfedilinkarrow-up1·13 hours agoThat doesn’t work? I would have thought it would work.
minus-squarelefixxx@lemmy.worldlinkfedilinkarrow-up2·13 hours ago!! Gets replaced by whatever was run before the alias command
minus-squarejuipeltje@lemmy.worldlinkfedilinkarrow-up68·1 day agoWas about to say, why would you copy anything when using sudo !! lol
minus-squaredevfuuu@lemmy.worldlinkfedilinkarrow-up23·1 day agoNot all shells support that. I use fish btw.
minus-squareguymontag@lemmy.mllinkfedilinkarrow-up2·17 hours agoHoly shit I wish fish supported it. I just press up arrow then hold left arrow and manually type sudo. It fucking sucks
minus-squaretekino@pawb.sociallinkfedilinkarrow-up1·7 hours agoI’ve been using this plugin https://github.com/oh-my-fish/plugin-bang-bang fish also allows going through previous arguments with alt+up
minus-squaredevfuuu@lemmy.worldlinkfedilinkarrow-up1·10 hours agoI’ve used it for so many years that it’s not an issue anymore. I remember using !! a lot but it was literally just for sudo. Now i either write what I need and do up or write what I need and then press alt+s, which seems even more intuitive now.
minus-squareBolshoyToster@sh.itjust.workslinkfedilinkarrow-up1·15 hours agoDoes your keyboard not have a home key?
minus-squareArchAengelus@lemmy.dbzer0.comlinkfedilinkarrow-up15·1 day agoI know what you meant (I have one for fish as well), but I chucked because you looked very enthusiastic about it! The fish function for !! is super useful though
minus-squareNannerBanner@literature.cafelinkfedilinkarrow-up6·1 day agoI don’t even know what I use anymore. My distro seems to keep changing it when I reinstall.
You can also just do a
sudo !!the!!is a shorthand for whatever you tried to run previously.wish i could alias that
alias ffs=“sudo !!”
alias ffs='sudo $(history -p !!)'Just to confirm: I tried this, it works.
That doesn’t work? I would have thought it would work.
!! Gets replaced by whatever was run before the alias command
Was about to say, why would you copy anything when using
sudo !!lolNot all shells support that.
I use fish btw.
Holy shit I wish fish supported it. I just press up arrow then hold left arrow and manually type sudo. It fucking sucks
I’ve been using this plugin https://github.com/oh-my-fish/plugin-bang-bang fish also allows going through previous arguments with alt+up
… are you not aware of Alt+S?!
I’ve used it for so many years that it’s not an issue anymore. I remember using !! a lot but it was literally just for sudo. Now i either write what I need and do up or write what I need and then press alt+s, which seems even more intuitive now.
Does your keyboard not have a home key?
I made my own !!
I know what you meant (I have one for fish as well), but I chucked because you looked very enthusiastic about it!
The fish function for
!!is super useful thoughI don’t even know what I use anymore. My distro seems to keep changing it when I reinstall.
echo $SHELLLol, thanks. Now I know.
I learned something new today!
I completely forgot about this one!