mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-31 13:57:26 -08:00
parent
f653fb46e5
commit
a56b90005f
|
@ -2,6 +2,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type osInfo struct {
|
type osInfo struct {
|
||||||
|
@ -84,7 +85,7 @@ func (n *osInfo) string() string {
|
||||||
n.os = p
|
n.os = p
|
||||||
return n.getDistroName(p, "")
|
return n.getDistroName(p, "")
|
||||||
}
|
}
|
||||||
n.os = wsl
|
n.os = strings.ToLower(wsl)
|
||||||
return fmt.Sprintf("%s%s%s",
|
return fmt.Sprintf("%s%s%s",
|
||||||
n.props.getString(WSL, "WSL"),
|
n.props.getString(WSL, "WSL"),
|
||||||
n.props.getString(WSLSeparator, " - "),
|
n.props.getString(WSLSeparator, " - "),
|
||||||
|
|
|
@ -62,7 +62,7 @@ func (c *Context) init(t *textTemplate) {
|
||||||
wsl := t.Env.getenv("WSL_DISTRO_NAME")
|
wsl := t.Env.getenv("WSL_DISTRO_NAME")
|
||||||
goos = t.Env.getPlatform()
|
goos = t.Env.getPlatform()
|
||||||
if len(wsl) != 0 {
|
if len(wsl) != 0 {
|
||||||
goos = wsl
|
goos = strings.ToLower(wsl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.OS = goos
|
c.OS = goos
|
||||||
|
|
Loading…
Reference in a new issue