use _pip_command_path_old for variable's name to store the pip's path:

modified:   completion/available/pip.completion.bash
modified:   completion/available/pip3.completion.bash
pull/1518/head
Hongyi Zhao 2020-03-13 17:05:10 +08:00
parent 43d15b69e1
commit 4fe6611da2
2 changed files with 4 additions and 4 deletions

View File

@ -50,9 +50,9 @@ _pip_completion_hook() {
_pip=/usr/bin/pip
fi
if [ -n "$_pip" ]; then
if [ -z "$_pip_old" ] || [ "$_pip_old" != "$_pip" ]; then
if [ -z "$_pip_command_path_old" ] || [ "$_pip_command_path_old" != "$_pip" ]; then
eval "$($_pip completion --bash)"
export _pip_old=$_pip
export _pip_command_path_old=$_pip
fi
fi
unset _pip

View File

@ -50,9 +50,9 @@ _pip_completion_hook() {
_pip=/usr/bin/pip3
fi
if [ -n "$_pip" ]; then
if [ -z "$_pip_old" ] || [ "$_pip_old" != "$_pip" ]; then
if [ -z "$_pip_command_path_old" ] || [ "$_pip_command_path_old" != "$_pip" ]; then
eval "$($_pip completion --bash)"
export _pip_old=$_pip
export _pip_command_path_old=$_pip
fi
fi
unset _pip