python: Expand compctl matches for pip variants
Expand `sed` match for more variants of 'pip*' (pip, pip2, pip3, pip2.7, pip3.7 etc.) for `compctl` assignment
This commit is contained in:
parent
dc8e168d5f
commit
9d3e2f0204
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue