mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-11-21 07:53:03 +01:00
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.
This commit is contained in:
1 parent
3d9b557be3
commit
361fb5c1ac
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user