dvorka / hstr

bash and zsh shell history suggest box - easily view, navigate, search and manage your command history.
http://me.mindforger.com
Apache License 2.0
4.06k stars 231 forks source link

Install using zinit #427

Open sev3ryn opened 3 years ago

sev3ryn commented 3 years ago

Zinit is extremely nice system to manage zsh plugins and binaries and it is cross-platform. E.g you can install tools using following commands

## vim
zinit ice as"program" atclone"rm -f src/auto/config.cache; ./configure" \
    atpull"%atclone" make pick"src/vim"
zinit light vim/vim

## ripgrep
zinit ice from"gh-r" as"command" mv"ripgrep* -> rg" pick"rg/rg"
zinit light BurntSushi/ripgrep

But I have difficulties installing hstr. I've tried it this way

zinit ice from"gh-r" as"command" bpick"*tgz" atinit"cd hstr; ./configure && make" pick"hstr/hstr"
zinit light dvorka/hstr

output of make:
hstr_history.c:160:52: error: no member named 'size' in 'HISTORY_STATE'
        unsigned radixMaxKeyEstimate=historyState->size*1000;
                                     ~~~~~~~~~~~~  ^
hstr_history.c:166:34: error: implicit declaration of function 'history_list' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
        HIST_ENTRY **historyList=history_list();

So my question is next - is there a cross-platform way of building hstr? Can binaries of hstr be prebuilt for the most used operating systems and architectures for future releases (e.g. by using github actions)?

dvorka commented 3 years ago

@sev3ryn thank you for :beetle: report. HSTR is pretty portable https://github.com/dvorka/hstr#installation, however, this is clearly a problem that could be solved. Can you please share your OS/distro/zsh version?