diff --git a/src/segments/python.go b/src/segments/python.go index 49cace56..ba518b05 100644 --- a/src/segments/python.go +++ b/src/segments/python.go @@ -51,6 +51,11 @@ func (p *Python) Init(props properties.Properties, env platform.Environment) { args: []string{"--version"}, regex: `(?:Python (?P((?P[0-9]+).(?P[0-9]+).(?P[0-9]+))))`, }, + { + executable: "py", + args: []string{"--version"}, + regex: `(?:Python (?P((?P[0-9]+).(?P[0-9]+).(?P[0-9]+))))`, + }, }, versionURLTemplate: "https://docs.python.org/release/{{ .Major }}.{{ .Minor }}.{{ .Patch }}/whatsnew/changelog.html#python-{{ .Major }}-{{ .Minor }}-{{ .Patch }}", displayMode: props.GetString(DisplayMode, DisplayModeEnvironment),