Merge pull request #1834 from NoahGorny/lazily-load-pip
completion: pip: Only invoke pip when trying to complete itpull/1960/head
commit
4984d7adc8
|
|
@ -7,5 +7,13 @@
|
||||||
# you should first initialize the corresponding environment.
|
# you should first initialize the corresponding environment.
|
||||||
# So that pip is in the system's path.
|
# So that pip is in the system's path.
|
||||||
if _command_exists pip; then
|
if _command_exists pip; then
|
||||||
eval "$(pip completion --bash)"
|
function __bash_it_complete_pip() {
|
||||||
|
if _command_exists _pip_completion; then
|
||||||
|
_pip_completion "$@"
|
||||||
|
else
|
||||||
|
eval "$(pip completion --bash)"
|
||||||
|
_pip_completion "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
complete -o default -F __bash_it_complete_pip pip
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,13 @@
|
||||||
# you should first initialize the corresponding environment.
|
# you should first initialize the corresponding environment.
|
||||||
# So that pip3 is in the system's path.
|
# So that pip3 is in the system's path.
|
||||||
if _command_exists pip3; then
|
if _command_exists pip3; then
|
||||||
eval "$(pip3 completion --bash)"
|
function __bash_it_complete_pip3() {
|
||||||
|
if _command_exists _pip_completion; then
|
||||||
|
_pip_completion "$@"
|
||||||
|
else
|
||||||
|
eval "$(pip3 completion --bash)"
|
||||||
|
_pip_completion "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
complete -o default -F __bash_it_complete_pip3 pip3
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue