From 361fb5c1acdf26e76b5df05de87cc3e26ab1f517 Mon Sep 17 00:00:00 2001 From: Zhiqi Zhang Date: Fri, 9 Oct 2026 07:46:10 +0800 Subject: [PATCH] fix(python): match two-digit minor versions in pyuserpaths (#14161) The version pattern used the shortest match (#), so "Python 3.11.4" was truncated to 3.1 and the ~/.local/lib/python3.11/site-packages check never matched on python >= 3.10, leaving pyuserpaths a no-op. Use a longest match (##) so the whole minor version is kept. --- plugins/python/python.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/python/python.plugin.zsh b/plugins/python/python.plugin.zsh index 2b139ddf0..e96363b9b 100644 --- a/plugins/python/python.plugin.zsh +++ b/plugins/python/python.plugin.zsh @@ -29,7 +29,7 @@ function pyuserpaths() { # Get minor release version. # The patch version is variable length, truncate it. - version=${(M)${"$($python -V 2>&1)":7}#[^.]##.[^.]##} + version=${(M)${"$($python -V 2>&1)":7}##[^.]##.[^.]##} # Add version specific path, if: # - it exists in the filesystem