diff --git a/src/segments/os.go b/src/segments/os.go index ee2ab16e..8d06f49e 100644 --- a/src/segments/os.go +++ b/src/segments/os.go @@ -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) diff --git a/src/segments/os_test.go b/src/segments/os_test.go index e0e4db06..9495cfb3 100644 --- a/src/segments/os_test.go +++ b/src/segments/os_test.go @@ -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)