4 ms·
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 s
by orthecreedence 5y ago
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.
- faho 5y agoIn 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.
- spear 5y agoThat 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.
- deleted 5y ago[deleted]
- acdha 5y agoI used to use Control-R a lot and now use the fish equivalent: https://fishshell.com/docs/current/interactive.html#searchable-command-history 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).