this post was submitted on 04 Jul 2023
1207 points (98.6% liked)
linuxmemes
20880 readers
2 users here now
I use Arch btw
Sister communities:
- LemmyMemes: Memes
- LemmyShitpost: Anything and everything goes.
- RISA: Star Trek memes and shitposts
Community rules
- Follow the site-wide rules and code of conduct
- Be civil
- Post Linux-related content
- No recent reposts
Please report posts and comments that break these rules!
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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.
But how to go backwards and forwards through the results? I just cycle through again!!
As @[email protected] said above, Ctrl+S
Wish I knew this sooner.