News for hackers. Stuff that matters.
Re:$!134 can be a nice bash foot shooter if you accidentally... by jakzq on Tuesday December 28, 2021 @05:00AM (#29712132)
Can you navigate C-r history, or are you forced to see only the last command?
Re:$!134 can be a nice bash foot shooter if you accidentally... by srik on Tuesday December 28, 2021 @06:48AM (#29712813)
Pair <C-r> with `fzf` if you want good ux.
Re:$!134 can be a nice bash foot shooter if you accidentally... by isenhaard on Tuesday December 28, 2021 @05:09AM (#29712176)
I've noted once within my personal bash cheat sheet this:

Search the command history

* Search as you type: Ctrl + r and type the search term; Repeat Ctrl + r to loop through results.

* Search the last remembered search term: Ctrl + r twice.

* End the search at current history entry: Ctrl + j

* Cancel the search and restore original line: Ctrl + g

Try of course at your own risk. But works for me.

Re:$!134 can be a nice bash foot shooter if you accidentally... by mbilker on Tuesday December 28, 2021 @05:04AM (#29712153)
You can! If you do C-r again, then it will show the next command in your history for the given search.