Carly™@lemmy.world to linuxmemes@lemmy.worldEnglish · 2 years agoLook, I'm lazy, okay?lemmy.worldimagemessage-square85fedilinkarrow-up11.26Karrow-down119
arrow-up11.24Karrow-down1imageLook, I'm lazy, okay?lemmy.worldCarly™@lemmy.world to linuxmemes@lemmy.worldEnglish · 2 years agomessage-square85fedilink
minus-squarem15otw@feddit.uklinkfedilinkEnglisharrow-up49·2 years 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-up12·2 years agoUse fzf for a more visual search.
minus-squarebrakenium@lemm.eelinkfedilinkEnglisharrow-up8·2 years agoI’ve been using this for a long time, never knew I could press Ctrl + R again. Thanks!
minus-squarewandering_nomad@lemmy.worldlinkfedilinkEnglisharrow-up8·2 years agoCtrl + S to go the other way if you overshoot!
minus-squarespoopyking@lemmy.fmhy.mllinkfedilinkEnglisharrow-up6·2 years agoOr history | grep 'command'
minus-squarem15otw@feddit.uklinkfedilinkEnglisharrow-up3·2 years agoCan’t just hit enter to run the one you want then, though.
minus-squarerufus@lemmy.worldlinkfedilinkEnglisharrow-up7·2 years agoType: !1234 … to run whatever history number of the command.
minus-squareSidewayspeach@feddit.nllinkfedilinkEnglisharrow-up1·2 years agoBut how to go backwards and forwards through the results? I just cycle through again!!
minus-squarem15otw@feddit.uklinkfedilinkEnglisharrow-up1·2 years agoAs @wandering_nomad@lemmy.world said above, Ctrl+S
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.
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!
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.
Wish I knew this sooner.
But how to go backwards and forwards through the results? I just cycle through again!!
As @wandering_nomad@lemmy.world said above, Ctrl+S