alphacyberranger@sh.itjust.works to Programmer Humor@programming.devEnglish · 3 months agoUp up and away we gosh.itjust.worksimagemessage-square34fedilinkarrow-up1397arrow-down116
arrow-up1381arrow-down1imageUp up and away we gosh.itjust.worksalphacyberranger@sh.itjust.works to Programmer Humor@programming.devEnglish · 3 months agomessage-square34fedilink
minus-squareFillicia@sh.itjust.workslinkfedilinkarrow-up36·3 months agoI really like this comic. Just in case someone didn’t know in Linux you can: -Ctrl + r to search previous commands Or -type history and precede the command number by an exclamation (!) to repeat the command (I.e. “!13”)
minus-squarevvv@programming.devlinkfedilinkarrow-up8·3 months agoI highly recommend installing fzf, and its shell integration. Makes your Ctrl + r magnitudes more pleasant to use!
minus-squarefmstrat@lemmy.nowsci.comlinkfedilinkEnglisharrow-up4·3 months agoOr control R, start typing a bit, control r again.
minus-squareBlackPenguins@lemmy.worldlinkfedilinkarrow-up7·3 months agoWhat. Da fuck. This always existed?!
minus-squareTrashboat@lemmy.blahaj.zonelinkfedilinkarrow-up8·3 months agoIt’s probably from within the last 30 years or so
minus-squareBlackPenguins@lemmy.worldlinkfedilinkarrow-up6·3 months agoOh good as long as it’s only a recent update.
minus-squarezarkanian@sh.itjust.workslinkfedilinkarrow-up5·3 months agoFish shell does this automatically. It’s one of the reasons I love it. You can auto-complete based on your command history.
minus-squareFillicia@sh.itjust.workslinkfedilinkarrow-up4·3 months agoI’m personlly a zsh+oh-my-zsh person which has the same type of auto complete option. My only regret is that something broke the thefuck plugin on my pc and now swearing at my screen doesn’t fix my mistakes.
minus-squareoxomoxo@lemmy.worldlinkfedilinkarrow-up5arrow-down1·3 months agoThis works in Powershell as well, even on Windows…
minus-squareAurenkin@sh.itjust.workslinkfedilinkarrow-up21·edit-23 months agoOr just !! for the last command. Particularly helpful if you forgot to prefix it with sudo you can run sudo !!
minus-squareRedderthanmisty@lemmygrad.mllinkfedilinkarrow-up2·3 months agoLearn something new everyday
minus-squareTetsuo@jlai.lulinkfedilinkarrow-up6·3 months agoAlso if you put “sensitive” information in your history by mistake you can use “history -d <line#>” to remove it. Unfortunately I had to use this command too many times.
minus-squareDefederateLemmyMl@feddit.nllinkfedilinkEnglisharrow-up1·3 months ago Ctrl + r to search previous commands That’s a readline thing by the way, so it doesn’t just work in bash but also works with other cli applications that are compiled with readline support, for example virsh, psql, fdisk, …
I really like this comic. Just in case someone didn’t know in Linux you can:
-Ctrl + r to search previous commands
Or
-type history and precede the command number by an exclamation (!) to repeat the command (I.e. “!13”)
I highly recommend installing fzf, and its shell integration. Makes your Ctrl + r magnitudes more pleasant to use!
Or control R, start typing a bit, control r again.
What. Da fuck. This always existed?!
It’s probably from within the last 30 years or so
Oh good as long as it’s only a recent update.
Fish shell does this automatically. It’s one of the reasons I love it. You can auto-complete based on your command history.
I’m personlly a zsh+oh-my-zsh person which has the same type of auto complete option.
My only regret is that something broke the thefuck plugin on my pc and now swearing at my screen doesn’t fix my mistakes.
This works in Powershell as well, even on Windows…
Or just
!!
for the last command. Particularly helpful if you forgot to prefix it withsudo
you can runsudo !!
Learn something new everyday
Also if you put “sensitive” information in your history by mistake you can use “history -d <line#>” to remove it.
Unfortunately I had to use this command too many times.
That’s a readline thing by the way, so it doesn’t just work in bash but also works with other cli applications that are compiled with readline support, for example
virsh
,psql
,fdisk
, …