Hacker News new | ask | show | jobs
by zhs 1687 days ago
Why not use fzf? https://github.com/junegunn/fzf
3 comments

Using fzf to power ^R (reverse history search) is such a huge productivity win. Also it has the side effect of showing you the last 10 commands without any other config or setup.
Have you tried Peco [1] in the past? Seems similar. I'd be curious to hear what people's experiences are of both technologies.

[1]: https://github.com/peco/peco

Thanks for posting that. Just installed it. Peco seems really neat.
By default that doesn't seem to pay attention to the current directory or the directories commands were run in. Is that a configuration option or something?
No but it would be very straightforward to do something like what the OP does, and then instead of using tail you just pipe the grep result for PWD into fzf. Which has some advantages: all commands instead of last n, plus of course the killer feature which is fuzzy matching.