diff --git a/zshrc b/zshrc index 7bfd75c..5325294 100644 --- a/zshrc +++ b/zshrc @@ -41,6 +41,19 @@ unsetopt flow_control && stty -ixon autoload -U compinit compinit +# Add pip to the old completion engine if present +if which pip &> /dev/null; then + function _pip_completion { + local words cword + read -Ac words + read -cn cword + reply=( $( COMP_WORDS="$words[*]" \ + COMP_CWORD=$(( cword-1 )) \ + PIP_AUTO_COMPLETE=1 $words[1] ) ) + } + compctl -K _pip_completion pip +fi + # Enable prompt themes autoload -Uz promptinit promptinit