Closed yuniet87 closed 1 week ago
@yuniet87 try adding the "cache_duration" property
{
"properties": {
"fetch_version": true,
"cache_duration": "1m"
},
"style": "plain",
"template": "<#ffffff>via</> \ue781 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
"foreground": "#98C379",
"type": "node"
},
The duration is a string in the format 1h2m3s
and is parsed using the time.ParseDuration function from the Go standard library. To disable the cache, use none
@ernstc unfortunately still doesn't work…
Previously it worked without this property, but yesterday I realized that it didn't work.
@yuniet87 remove the cache first with oh-my-posh cache clear
, this should work.
@JanDeDobbeleer clearing cache and setting cache_duration
to none
,
work like a charm,
Thanks a lot!
I'm wondering if this should be the default behavior. The reason I changed that is because I wanted to optimize for performance, but maybe the behavior is counterintuitive.
I'm wondering if this should be the default behavior. The reason I changed that is because I wanted to optimize for performance, but maybe the behavior is counterintuitive.
Maybe a little... Imho, in this specific situation is expected that the version change as soon as you change with nvm.
Code of Conduct
What happened?
When use nvm to change node version, the language segment is not updating the version in terminal.
Theme
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output