Carly™@lemmy.world to linuxmemes@lemmy.worldEnglish · 1 year agoLook, I'm lazy, okay?lemmy.worldimagemessage-square81fedilinkarrow-up11.12Karrow-down117
arrow-up11.11Karrow-down1imageLook, I'm lazy, okay?lemmy.worldCarly™@lemmy.world to linuxmemes@lemmy.worldEnglish · 1 year agomessage-square81fedilink
minus-squarem15otw@feddit.uklinkfedilinkEnglisharrow-up42·1 year agoCtrl+R Then type any part of the command (filename, search string, etc) Ctrl+R again to cycle through the matches. (Best feature in bash)
minus-squarep0q@sh.itjust.workslinkfedilinkEnglisharrow-up11·1 year agoUse fzf for a more visual search.
minus-squarespoopyking@lemmy.fmhy.mllinkfedilinkEnglisharrow-up6·1 year agoOr history | grep 'command'
minus-squarem15otw@feddit.uklinkfedilinkEnglisharrow-up1·1 year agoCan’t just hit enter to run the one you want then, though.
minus-squarerufus@lemmy.worldlinkfedilinkEnglisharrow-up7·1 year agoType: !1234 … to run whatever history number of the command.
minus-squarebrakenium@lemm.eelinkfedilinkEnglisharrow-up6·1 year agoI’ve been using this for a long time, never knew I could press Ctrl + R again. Thanks!
minus-squarewandering_nomad@lemmy.worldlinkfedilinkEnglisharrow-up4·1 year agoCtrl + S to go the other way if you overshoot!
minus-squareSidewayspeach@feddit.nllinkfedilinkEnglisharrow-up1·1 year agoBut how to go backwards and forwards through the results? I just cycle through again!!
Ctrl+R
Then type any part of the command (filename, search string, etc)
Ctrl+R again to cycle through the matches.
(Best feature in bash)
Use fzf for a more visual search.
This is the way.
Or
history | grep 'command'
Can’t just hit enter to run the one you want then, though.
Type: !1234 … to run whatever history number of the command.
I’ve been using this for a long time, never knew I could press Ctrl + R again. Thanks!
Ctrl + S to go the other way if you overshoot!
But how to go backwards and forwards through the results? I just cycle through again!!
Wish I knew this sooner.