From a987c8bc8a142d2792c4d067998959971dbc91fa Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Wed, 12 Dec 2018 16:18:58 -0600 Subject: [PATCH] python: Fix pip compctl file match pattern Make `sed` match more reliable while replacing the whole of 'pip*' with 'pip pip2 pip3' for `compctl` assignment --- modules/python/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/init.zsh b/modules/python/init.zsh index 302aff4b66..d61488ed9a 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -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"