Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if env exists before add to powerline #468

Open
versatran01 opened this issue Jul 15, 2019 · 3 comments
Open

Check if env exists before add to powerline #468

versatran01 opened this issue Jul 15, 2019 · 3 comments

Comments

@versatran01
Copy link

currently if env var not set it displays None.

@jceaser
Copy link
Contributor

jceaser commented Jul 24, 2019

Confirm, none is displayed. To be clear, your suggesting that nothing show? I would suggest that you be able to overwrite the default value.

jceaser added a commit to jceaser/powerline-shell that referenced this issue Jul 24, 2019
jceaser added a commit to jceaser/powerline-shell that referenced this issue Jul 24, 2019
@CWempe
Copy link

CWempe commented Nov 3, 2019

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"
    },

@CWempe
Copy link

CWempe commented Nov 3, 2019

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.
#470

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants