powerline-shell
powerline-shell copied to clipboard
Check if env exists before add to powerline
currently if env var not set it displays None.
Confirm, none is displayed. To be clear, your suggesting that nothing show? I would suggest that you be able to overwrite the default value.
I support this feature request.
It would be great if the segment could be omitted if the env is not set.
But of cause it would be nice to have an option to define if you want no segment,
or <default>
.
I think the definition could look like this:
{
"type": "env",
"var": "STY",
"skip_if_not_set": "false",
"default": "nothing to see here"
},
{
"type": "env",
"var": "STY",
"skip_if_not_set": "true"
},
Now I see: If I do not define default
, the segment is omitted.
So your changes are working as we wanted. Thanks.
~~I would suggest you create a pull request to integrate this into the official project.~~ https://github.com/b-ryan/powerline-shell/pull/470