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
Kubernetes namespace display can be turned off #575
Conversation
There was a problem hiding this 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.
I forgot to update the documentation, will be done in a moment. Update: Done :) |
There was a problem hiding this 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 👍
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. |
@@ -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 | |
There was a problem hiding this comment.
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.
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 runningkubectl config view --minify --output 'jsonpath={..namespace}'
command.Screenshot