Skip to content

Only empty brackets in prompt if no ~/.kube/config is present and KUBECONFIG is not set #213

Description

@kastl-ars

Dear Jon,

I found kube-ps1 recently and found it a very nice and easy way to customize the prompt. I could almost tweak it to my liking, there is only one thing left.

I do not have a ~/.kube/config file, as my kubeconfig files are managed in different locations and "selected" via kubie.

As soon as I use kubie to select a kubeconfig file, the prompt is shown as I configured it, i.e. no symbol and only the namespace.

Outside of kubie, I just have two emtpy brackets being shown in the prompt:

() myuser@myhost:/home/myuser>

I checked and KUBE_PS1_HIDE_IF_NOCONTEXT is set to true. Did I miss something or is this intended behaviour?

Kind Regards,
Johannes

P.S: Do you want to enable GitHub discussions on this repository? As e.g. this issue is more of a question and not an actual bug or issue it might be better placed in the discussions...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions