Environment Variable
#
WhatShow the content of an environment variable. Can be used to visualize a local settings/context unavailable to Go my Posh otherwise.
For example, in PowerShell, adding the below configuration to a block and extending the prompt function to set an environment variable before the prompt, you can work a bit of magic.
If you're using the PowerShell module, you can override a function to achieve the same effect.
make sure to do this after importing go-my-posh
and you're good to go.
The segment will show when the value of the environment variable isn't empty.
#
Sample Configuration- var_name:
string
- the name of the environment variable