# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0

github.setup        zsh-users zsh-history-substring-search 1.1.0 v
github.tarball_from archive

categories          sysutils shells

maintainers         {@bashu gmail.com:bashu.was.here} openmaintainer

description         Zsh port of Fish shell's history search.

long_description    This is a clean-room implementation of the Fish shell's \
                    history search feature, where you can type in any part of \
                    any command from history and then press chosen keys, such \
                    as the UP and DOWN arrows, to cycle through matches.

license             BSD

platforms           any
supported_archs     noarch

checksums           rmd160  758ea5e80668724140d6b955dfe62b148ca3d02c \
                    sha256  9b52eca6c894dd98caa5f07160199f3f3179ff017575d5acc9fdc467b1ac70f8 \
                    size    9984

depends_run         path:bin/zsh:zsh
use_configure       no

build { }

destroot {
    set dest_dir ${destroot}${prefix}/share/zsh-history-substring-search
    xinstall -d ${dest_dir}
    xinstall -m 0644 ${worksrcpath}/zsh-history-substring-search.zsh ${dest_dir}
}

github.livecheck.regex {([^"-]+)}

notes "
To activate the history search, add this line to your configuration:\

    source '${prefix}/share/${name}/${name}.zsh'\

Please note that this line must be after loading all custom widgets,\
at the end of your .zshrc. You will need to restart your terminal for\
this change to take effect.\
"
