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

Kubernetes namespace display can be turned off #575

Merged
merged 2 commits into from Nov 30, 2018
Merged

Kubernetes namespace display can be turned off #575

merged 2 commits into from Nov 30, 2018

Conversation

nomaed
Copy link
Contributor

@nomaed nomaed commented Nov 30, 2018

Description

Adds a config flag to the kubecontext section to control whether namespace is displayed or not.

By default, original behavior is conserved and display is on.

By setting SPACESHIP_KUBECONTEXT_NAMESPACE_SHOW=false in .zshrc it is possible to get rid of this display in case namespace is not something one is interested in. This also avoids running kubectl config view --minify --output 'jsonpath={..namespace}' command.

Screenshot

screen shot 2018-11-30 at 11 11 27

Copy link
Contributor

@maximbaz maximbaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff 👍 we didn't implement it earlier because we didn't know if anyone will actually need this functionality, but I'm happy to merge this now knowing that there is someone who will be using this new parameter.

@nomaed
Copy link
Contributor Author

nomaed commented Nov 30, 2018

I forgot to update the documentation, will be done in a moment.

Update: Done :)

Copy link
Member

@salmanulfarzy salmanulfarzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We did have discussion about this (898abaa) and here you are 👍

@salmanulfarzy salmanulfarzy added the improvement A PR that make small changes for improving UX, performance, readability, etc label Nov 30, 2018
@salmanulfarzy
Copy link
Member

salmanulfarzy commented Nov 30, 2018

There was issues with publishing v3.8.1 earlier, Corresponding commit wasn't pushed because of branch protection. This can be merged as soon as it's resolved.

Update: Release issue have been resolved. Merging this.

@salmanulfarzy salmanulfarzy merged commit bbe26c3 into spaceship-prompt:master Nov 30, 2018
@nomaed nomaed deleted the kubectl-optional-namespace branch December 1, 2018 10:45
@@ -479,6 +479,7 @@ Shows the active kubectl context, which consists of a cluster name and, when wor
| `SPACESHIP_KUBECONTEXT_SUFFIX` | `$SPACESHIP_PROMPT_DEFAULT_SUFFIX` | Suffix after Kubectl context section |
| `SPACESHIP_KUBECONTEXT_SYMBOL` | `☸️·` | Character to be shown before Kubectl context |
| `SPACESHIP_KUBECONTEXT_COLOR` | `cyan` | Color of Kubectl context section |
| `SPACESHIP_KUBECONTEXT_NAMESPACE_SHOW` | `true` | Should namespace be also displayed |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need rules for naming new options. Add a section in CONTRIBUTING.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement A PR that make small changes for improving UX, performance, readability, etc
Development

Successfully merging this pull request may close these issues.

None yet

4 participants