# Copyright 2023-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.10

EAPI=8

CRATES="
"

RUST_MIN_VER="1.85.0"

inherit cargo git-r3 shell-completion

DESCRIPTION="A smarter cd command for your terminal"
HOMEPAGE="https://github.com/ajeetdsouza/zoxide"
EGIT_REPO_URI="https://github.com/Erio-Harrison/zoxide.git"
EGIT_BRANCH="feature-acronyms-1002"
SRC_URI="
        ${CARGO_CRATE_URIS}
"

LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
        MIT MPL-2.0 Unicode-3.0
        || ( Apache-2.0 Boost-1.0 )
        || ( Apache-2.0 CC0-1.0 MIT-0 )
"
SLOT="0"

QA_FLAGS_IGNORED="usr/bin/zoxide"

src_unpack() {
        git-r3_src_unpack
        cargo_live_src_unpack
}

src_prepare() {
        sed -i 's:strip = true:strip = false:g' Cargo.toml || die
        default
}

src_install() {
        cargo_src_install

        doman man/man1/*
        dodoc README.md CHANGELOG.md

        newbashcomp contrib/completions/"${PN}".bash "${PN}"
        dozshcomp contrib/completions/_"${PN}"
        dofishcomp contrib/completions/"${PN}".fish

        insinto /usr/share/"${PN}"
        doins init.fish
        doins zoxide.plugin.zsh
}