Commit 2640f19
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| 129 | + | |
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| |||
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| 139 | + | |
136 | 140 | | |
137 | 141 | | |
138 | 142 | | |
| |||
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| 149 | + | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
| |||
0 commit comments