mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
parent
2b47173cdb
commit
523cd98e1a
|
@ -38,7 +38,7 @@ func (oi *Os) Enabled() bool {
|
|||
pf := oi.env.Platform()
|
||||
displayDistroName := oi.props.GetBool(DisplayDistroName, false)
|
||||
if displayDistroName {
|
||||
oi.Icon = pf
|
||||
oi.Icon = oi.props.GetString(properties.Property(pf), pf)
|
||||
break
|
||||
}
|
||||
oi.Icon = oi.getDistroIcon(pf)
|
||||
|
|
|
@ -76,6 +76,14 @@ func TestOSInfo(t *testing.T) {
|
|||
GOOS: "linux",
|
||||
Platform: "crazy",
|
||||
},
|
||||
{
|
||||
Case: "show distro name, mapped",
|
||||
ExpectedString: "<3",
|
||||
DisplayDistroName: true,
|
||||
GOOS: "linux",
|
||||
Icon: "<3",
|
||||
Platform: "love",
|
||||
},
|
||||
}
|
||||
for _, tc := range cases {
|
||||
env := new(mock.MockedEnvironment)
|
||||
|
|
Loading…
Reference in a new issue