caiogondim / bullet-train.zsh

:bullettrain_side: An oh-my-zsh shell theme based on the Powerline Vim plugin
MIT License
2.82k stars 382 forks source link

Adds a Kubernetes Context Segment #257

Closed embano1 closed 6 years ago

embano1 commented 6 years ago

This PR adds a Kubernetes context segment.

It requires the user to at least set BULLETTRAIN_KCTX_KCONFIG to a valid kubeconfig location (e.g. /Users/<username>/.kube/config on OSX) and have kubectl installed.

Other variables supported (with default values):

BULLETTRAIN_KCTX_BG # Background color, default: yellow
BULLETTRAIN_KCTX_FG # Foreground color, default: white
BULLETTRAIN_KCTX_PREFIX # Segment prefix, default: ⎈

Example:

bildschirmfoto 2017-12-25 um 00 01 16
caiogondim commented 6 years ago

That's beautiful. Thanks for that.

Qwerios commented 5 years ago

Just a heads up the kctx prompt is not in the default prompt order. So the only way to get it to show up is to define a custom prompt order and add it yourself. Even with the BULLETTRAIN_KCTX_KCONFIG set this was needed. I just added it to the default prompt in the theme source file.

embano1 commented 5 years ago

@Qwerios good catch! Do you want to file a PR to make sure it ends up in the default prompt?

Qwerios commented 5 years ago

Pull request has been made