Re:s/bash/zsh/g
by acdha on Wednesday October 20, 2021 @03:20PM
(#28934945)
What specifically are you looking for? It has history search but it sounds like you’re looking for something specific?
[ Parent
| on HN ]
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.
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).
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.