Merge pull request #1964 from gaelicWizard/completion-pip
completion/pip: simplify control flowpull/1885/head
commit
8a1dc96bc0
|
|
@ -6,9 +6,11 @@
|
|||
# If the pip package is installed within virtual environments, say, python managed by pyenv,
|
||||
# you should first initialize the corresponding environment.
|
||||
# So that pip is in the system's path.
|
||||
if _command_exists pip; then
|
||||
_command_exists pip || return
|
||||
|
||||
function __bash_it_complete_pip() {
|
||||
if _command_exists _pip_completion; then
|
||||
complete -o default -F _pip_completion pip
|
||||
_pip_completion "$@"
|
||||
else
|
||||
eval "$(pip completion --bash)"
|
||||
|
|
@ -16,4 +18,3 @@ if _command_exists pip; then
|
|||
fi
|
||||
}
|
||||
complete -o default -F __bash_it_complete_pip pip
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -6,9 +6,11 @@
|
|||
# If the pip package is installed within virtual environments, say, python managed by pyenv,
|
||||
# you should first initialize the corresponding environment.
|
||||
# So that pip3 is in the system's path.
|
||||
if _command_exists pip3; then
|
||||
_command_exists pip3 || return
|
||||
|
||||
function __bash_it_complete_pip3() {
|
||||
if _command_exists _pip_completion; then
|
||||
complete -o default -F _pip_completion pip3
|
||||
_pip_completion "$@"
|
||||
else
|
||||
eval "$(pip3 completion --bash)"
|
||||
|
|
@ -16,4 +18,3 @@ if _command_exists pip3; then
|
|||
fi
|
||||
}
|
||||
complete -o default -F __bash_it_complete_pip3 pip3
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue