dev-util/juliaup: add shell completions generation

dev-util/juliaup currently doesn't generate automatically shell completions like
dev-util/rustup does.

Closes: https://bugs.gentoo.org/966938
Co-authored-by: Lucio Sauer <watermanpaint@posteo.net>
Signed-off-by: Igna Martinoli <ignamartinoli@protonmail.com>
Part-of: https://github.com/gentoo/guru/pull/402
Closes: https://github.com/gentoo/guru/pull/402
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
This commit is contained in:
ignamartinoli@proton.me
2025-12-01 13:50:51 -03:00
committed by Lucio Sauer
parent bdb67388b0
commit 155cddfeb7

View File

@@ -324,7 +324,7 @@ CRATES="
zerovec@0.11.4
"
inherit cargo
inherit cargo shell-completion toolchain-funcs
DESCRIPTION="Julia installer and version multiplexer"
HOMEPAGE="https://github.com/JuliaLang/juliaup"
@@ -358,3 +358,23 @@ src_test() {
)
cargo_src_test -- "${mytestargs[@]}"
}
src_install() {
cargo_src_install
einstalldocs
if ! tc-is-cross-compiler; then
einfo "generating shell completion files"
"${ED}"/usr/bin/juliaup completions bash > "${T}/${PN}" || die
dobashcomp "${T}/${PN}"
"${ED}"/usr/bin/juliaup completions zsh > "${T}/_${PN}" || die
dozshcomp "${T}/_${PN}"
"${ED}"/usr/bin/juliaup completions fish > "${T}/${PN}.fish" || die
dofishcomp "${T}/${PN}.fish"
else
ewarn "Shell completion files not installed! Install them manually with '${PN} completions --help'"
fi
}