News for hackers. Stuff that matters.
Re:s/bash/zsh/g by orthecreedence on Wednesday October 20, 2021 @03:40PM (#28935204)
In bash, I can type ctrl+r then type a few characters, and the last command that contains that string will get pulled up and I can hit [enter] to run it.

Not sure if fish has this or not, but I use reverse search in bash exhaustively.

Re:s/bash/zsh/g by acdha on Wednesday October 20, 2021 @05:55PM (#28937285)
I used to use Control-R a lot and now use the fish equivalent:

https://fishshell.com/docs/current/interactive.html#searchab...

I find it to be more polished and especially like the way it works with fragments (e.g. if you start typing "git log" and hit Option/Alt-ꜛ it will find commands prefixed with that whereas bash Control-R requires you to hit Control-R first and then type that, which isn't as handy when you realize you want to search halfway through).

Re:s/bash/zsh/g by faho on Wednesday October 20, 2021 @03:59PM (#28935552)
In fish: Just enter the text you want to look for into the commandline and press [up].

There's no need to enter a separate mode via ctrl-r.

Re:s/bash/zsh/g by spear on Wednesday October 20, 2021 @05:32PM (#28936965)
That separate mode is incremental search and it's a big advantage. It lets you keep extending the search string until it matches the command you're looking for.