zsh-histdb icon indicating copy to clipboard operation
zsh-histdb copied to clipboard

Plugin manager support

Open audunmo opened this issue 4 years ago • 2 comments

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

audunmo avatar Aug 19 '20 08:08 audunmo

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 '$base_dir/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.

xkortex avatar Aug 21 '20 01:08 xkortex

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?

larkery avatar Jan 14 '21 14:01 larkery