dev-python/typer: fix TYPER_COMPLETE var in completion scripts

This commit is contained in:
odrling 2024-04-05 23:49:54 +02:00
parent ba96c101ad
commit 2aae86711b
No known key found for this signature in database
GPG key ID: EC907F69A27A90C5

View file

@ -77,7 +77,7 @@ typer_gencomp() {
compfile="$(typer_get_comp "${@}")"
_TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1 python -m typer --show-completion "${shell}" |
sed 's/python -m //g ; s/_PYTHON _M //g ; s/python_m//g' > "${compfile}" ||
sed 's/python -m //g ; s/_PYTHON _M //g ; s/python_m//g ; s/_TYPER_COMPLETE/TYPER_COMPLETE/' > "${compfile}" ||
die "failed to generate ${shell} completion"
}