Closed hemna closed 3 years ago
I was able to get it working by making it a function
def _cloud_name():
return __xonsh__.env.get("CCLOUD_NAME", None)
$PROMPT_FIELDS['ccloud'] = _cloud_name
Yep! The lambda also works:
$PROMPT_FIELDS['ccloud'] = lambda: __xonsh__.env.get("CCLOUD_NAME", None)
If you like prompt-bar please star the repo :)
I have an environment var that I change quite a bit and wanted to have the value show up on the bar, but it doesn't seem to update.
Parts of my ~/.xonshrc
If source ~/.xonshrc then the value gets updated, but if I just change the env var $CCLOUD_NAME, then it doesn't get updated.