try to fix for pyenv/virtualenv: completion/available/pip.completion.bash
parent
b35d41464c
commit
9fcaab0efc
|
|
@ -5,6 +5,14 @@
|
|||
# If the pip package is installed within virtual environments, say, python managed by pyenv,
|
||||
# you should first initilization the corresponding environment.
|
||||
# So that the pip/pip3 is in system's path.
|
||||
if command -v pip >/dev/null; then
|
||||
eval "$(pip completion --bash)"
|
||||
|
||||
# For the pyenv-based environment:
|
||||
if which pyenv >/dev/null; then
|
||||
if pyenv which pip 2>/dev/null; then
|
||||
eval "$(pip completion --bash)"
|
||||
fi
|
||||
else
|
||||
if command -v pip >/dev/null; then
|
||||
eval "$(pip completion --bash)"
|
||||
fi
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue