Skip to content

Commit 2640f19

Browse files
committed
omp.json: language segments display_mode="files" -- kill "NO VERSION" leak
Operator 2026-05-09 screenshot showed `pwsh ... C:\WINDOWS\system32 ... NO VERSION ... 12:30` in the right block when the bootstrap fell through to the host pwsh prompt. "NO VERSION" was one of the language segments (node / python / go / rust / dotnet) firing in a directory with no project indicators and dumping its empty .Full placeholder as literal "NO VERSION". oh-my-posh's default `display_mode = "always"` makes language segments render in every prompt, even outside a project. Added `"display_mode": "files"` to each of the 5 language segments so they ONLY render when project indicator files are present in cwd: node -> package.json, package-lock.json python -> *.py, requirements.txt, pyproject.toml, .python-version go -> go.mod, go.sum, *.go rust -> Cargo.toml, Cargo.lock, *.rs dotnet -> *.csproj, *.sln, *.fsproj, *.vbproj In every other directory the language segments now stay silent -- the right block collapses cleanly to just OS icon + battery (if present) + time, no stray "NO VERSION" placeholder. For the node segment: merged "display_mode" into the existing properties dict (alongside fetch_package_manager + npm_icon + yarn_icon). Other 4 segments had no properties block, so gained one with just the display_mode key.
1 parent 3914d4a commit 2640f19

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

usr/share/mios/oh-my-posh/mios.omp.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"background": "#303030",
103103
"foreground": "#3C873A",
104104
"properties": {
105+
"display_mode": "files",
105106
"fetch_package_manager": true,
106107
"npm_icon": " <#cc3a3a></> ",
107108
"yarn_icon": " <#348cba></>"
@@ -115,6 +116,7 @@
115116
"powerline_symbol": "",
116117
"background": "#306998",
117118
"foreground": "#FFE873",
119+
"properties": { "display_mode": "files" },
118120
"template": "  {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} "
119121
},
120122
{
@@ -124,6 +126,7 @@
124126
"powerline_symbol": "",
125127
"background": "#E7DFD3",
126128
"foreground": "#06aad5",
129+
"properties": { "display_mode": "files" },
127130
"template": "  {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
128131
},
129132
{
@@ -133,6 +136,7 @@
133136
"powerline_symbol": "",
134137
"background": "#E7DFD3",
135138
"foreground": "#925837",
139+
"properties": { "display_mode": "files" },
136140
"template": "  {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} "
137141
},
138142
{
@@ -142,6 +146,7 @@
142146
"powerline_symbol": "",
143147
"background": "#0e0e0e",
144148
"foreground": "#0d6da8",
149+
"properties": { "display_mode": "files" },
145150
"template": "  {{ if .Unsupported }}{{ else }}{{ .Full }}{{ end }} "
146151
},
147152
{

0 commit comments

Comments
 (0)