Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does fish still not have reverse search? I have a hard time taking a shell seriously if you can't perform an operation at least as good as this. Even Powershell supports reverse search!


I use fzf for reverse search and it works in fish with ctrl+r binding.

I'm guessing someone probably has a plugin for it or people just get used to using autosuggest


What specifically are you looking for? It has history search but it sounds like you’re looking for something specific?


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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: