Open
Description
til::env
is rather complex, reads a lot of registry keys and requires lots of string operations. Since #14999 we recreate the til::env
cache every time we create a new tab, but this isn't necessary, considering that changes to environment variables are exceedingly rare. Most users will run a Windows Terminal instance without it ever seeing a single environment variable change.
👉 Listen to WM_SETTINGCHANGE
and only then recreate the globally shared cache. If multi-threading is a concern, just encode the variables back into a \0
separated string, the same way we get it from the OS anyways already. This would reflect how ConEmu does it: Maximus5/ConEmu#468