This is a reimplementation of https://github.com/m42e/zsh-histdb-fzf in rust and using skim as a library.
zsh-histdb-fzf works, but it is a bit quirky. It has for sure some flaws, regarding responsiveness and communication with processes. skim offers a fzf like behavior and is available as library in rust. It lacks some highlighting in the header, and has a bit different order/matching algorithm.
This should result in better performance, responsiveness and a more stable behavior.
skim is available in rust. I have never tried rust with a purpose before. I wanted to give it a try and learn something new.
Well, it accesses the zsh histdb. It lets you search on different levels.
Install the plugin, e.g. using zplug.
zplug 'm42e/zsh-histdb-skim', from:github, use:zsh-histdb-skim.zsh, at:main
It downloads the binary (if available) automatically. You can do manually by calling histdb-skim-download
.
The plugin calls bindkey
but some other plugins may overwrite. In this case you would have to do it yourself:
bindkey '^R' histdb-skim-widget
cargo build --release
mkdir -p bin
mv target/release/zsh-histdb-skim bin
- improve rust code
While I stole the idea from myself, this is my first rust project ever. So I would be glad for tips and improvement PRs.