use _pip_command_path as the variable name to store the currently used pip's path.

pull/1518/head
Hongyi Zhao 2020-03-13 17:18:10 +08:00
parent 4fe6611da2
commit e6be506ce1
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_command_path_old" ] || [ "$_pip_command_path_old" != "$_pip" ]; then
if [ -z "$_pip_command_path" ] || [ "$_pip_command_path" != "$_pip" ]; then
eval "$($_pip completion --bash)"
export _pip_command_path_old=$_pip
export _pip_command_path=$_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_command_path_old" ] || [ "$_pip_command_path_old" != "$_pip" ]; then
if [ -z "$_pip_command_path" ] || [ "$_pip_command_path" != "$_pip" ]; then
eval "$($_pip completion --bash)"
export _pip_command_path_old=$_pip
export _pip_command_path=$_pip
fi
fi
unset _pip