Skip to content

Commit

Permalink
python: Fix pip compctl file match pattern
Browse files Browse the repository at this point in the history
Make `sed` match more reliable while replacing the whole of 'pip*' with 
'pip pip2 pip3' for `compctl` assignment
  • Loading branch information
indrajitr authored Dec 12, 2018
1 parent f745645 commit a987c8b
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 pip2 pip3|" >! "$cache_file" 2> /dev/null
fi

source "$cache_file"
Expand Down

0 comments on commit a987c8b

Please sign in to comment.