Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions completion/available/pip.completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
# 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
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
_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)"
_pip_completion "$@"
fi
}
complete -o default -F __bash_it_complete_pip pip
23 changes: 12 additions & 11 deletions completion/available/pip3.completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
# 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
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
_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)"
_pip_completion "$@"
fi
}
complete -o default -F __bash_it_complete_pip3 pip3