Skip to content

Commit

Permalink
python: Expand compctl matches for pip variants
Browse files Browse the repository at this point in the history
Expand `sed` match for more variants of 'pip*' (pip, pip2, pip3, pip2.7, 
pip3.7 etc.) for `compctl` assignment
  • Loading branch information
indrajitr authored Dec 15, 2018
1 parent dc8e168 commit 9d3e2f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/python/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ if (( $#commands[(i)pip(|[23])] )); then
|| ! -s "$cache_file" ]]; then
# pip is slow; cache its output. And also support 'pip2', 'pip3' variants
$pip_command completion --zsh \
| sed -e "s|\(compctl -K [-_[:alnum:]]*\) pip.*|\1 pip pip2 pip3|" >! "$cache_file" 2> /dev/null
| sed -e "s/\(compctl -K [-_[:alnum:]]*\) pip.*/\1 pip(|[23](|.[0-9]))/" >! "$cache_file" 2> /dev/null
fi

source "$cache_file"
Expand Down

0 comments on commit 9d3e2f0

Please sign in to comment.