dev-python/typer: install shell completions for typer command
This commit is contained in:
parent
97cb2703c3
commit
91aa52ab55
|
@ -6,7 +6,7 @@ EAPI=8
|
|||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
DISTUTILS_USE_PEP517=pdm-backend
|
||||
|
||||
inherit distutils-r1
|
||||
inherit distutils-r1 shell-completion
|
||||
|
||||
DESCRIPTION="Build great CLIs. Easy to code. Based on Python type hints."
|
||||
HOMEPAGE="
|
||||
|
@ -14,9 +14,7 @@ HOMEPAGE="
|
|||
https://github.com/tiangolo/typer
|
||||
https://pypi.org/project/typer/
|
||||
"
|
||||
SRC_URI="
|
||||
https://github.com/tiangolo/${PN}/archive/${PV}.tar.gz
|
||||
-> ${P}.gh.tar.gz"
|
||||
SRC_URI="https://github.com/tiangolo/${PN}/archive/${PV}/${P}.gh.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
|
@ -46,3 +44,12 @@ src_test() {
|
|||
|
||||
distutils-r1_src_test "${@}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
distutils-r1_src_install "${@}"
|
||||
|
||||
export _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1
|
||||
newzshcomp <(python -m typer --show-completion zsh) "_${PN}"
|
||||
newfishcomp <(python -m typer --show-completion fish) "${PN}.fish"
|
||||
newbashcomp <(python -m typer --show-completion bash) "${PN}"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue