larkery / zsh-histdb

A slightly better history for zsh
MIT License
1.27k stars 75 forks source link

Plugin manager support #87

Open audunmo opened 4 years ago

audunmo commented 4 years ago

I'd love to add zplug support and other plugin manager support to this. Is this something that PRs would be welcomed for?

xkortex commented 4 years ago

I just did a test run on this for oh-my-zsh (never tried zplug but I imagine it's similar?). Instead of

    autoload -Uz add-zsh-hook

in .zshrc, I have plugins=(git zsh-autosuggestions ...others... zsh-histdb). Then, to match the oh-my-zsh plugin pattern ( '$base_dir/plugins/$name/$name.plugin.zsh' or '$basedir/plugins/$name/$name'), I just symlinked ln -s sqlite-history.zsh zsh-histdb.plugin.zsh.

Seems to work just the same. So that is a plausible addition. In fact $name.plugin.zsh seems a quite common pattern. I wonder if it's worth it to rename sqlite-history.zsh to zsh-histdb.plugin.zsh.

larkery commented 3 years ago

I don't use any of these things, but I thought I had accepted a PR which did this already?

My impression was that the existence of this file: https://github.com/larkery/zsh-histdb/blob/master/zsh-histdb.plugin.zsh

would do the job?