completions/conda: check also "register-python-argcomplete{3,2}"

This commit is contained in:
Koichi Murase 2022-09-27 10:33:09 +09:00
parent bf319e3d31
commit 81e2726867

View File

@ -1,4 +1,10 @@
#! bash oh-my-bash.module
_omb_util_binary_exists register-python-argcomplete \
&& eval "$(register-python-argcomplete conda)" \
|| echo "Please install argcomplete to use conda completion"
if _omb_util_binary_exists register-python-argcomplete; then
eval "$(register-python-argcomplete conda)"
elif _omb_util_binary_exists register-python-argcomplete3; then
eval "$(register-python-argcomplete3 conda)"
elif _omb_util_binary_exists register-python-argcomplete2; then
eval "$(register-python-argcomplete2 conda)"
else
echo "Please install argcomplete to use conda completion" >&2
fi