We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is your feature request related to a problem? Please describe. No, just a feature to display the kubernetes cluster I'm in + the namespace
Describe the solution you'd like To display the kubernetes cluster I'm in + the namespace
Describe alternatives you've considered If it would be possible to add my custom functions that could also work.
The text was updated successfully, but these errors were encountered:
Hey @MosheM123 !
What would your function look like?
I really like the option of letting a user add a prefix to the left prompt that could be a function or simply text, so we might go with that.
Sorry, something went wrong.
Here's what I want to add: https://github.com/jonmosco/kube-ps1
@mosheavni Here is my solution to the problem:
k8s_current_context() { echo "[k8s:$(kubectl config current-context | awk -F'/' '{print $2}')]"; } export TYPEWRITTEN_RIGHT_PROMPT_PREFIX_FUNCTION=k8s_current_context export TYPEWRITTEN_COLORS="right_prompt_prefix:#FF80BF"
Specifically you may need to tailor any post processing of the current context, which in my case I achieve with: awk -F'/' '{print $2}'
awk -F'/' '{print $2}'
No branches or pull requests
Is your feature request related to a problem? Please describe.
No, just a feature to display the kubernetes cluster I'm in + the namespace
Describe the solution you'd like
To display the kubernetes cluster I'm in + the namespace
Describe alternatives you've considered
If it would be possible to add my custom functions that could also work.
The text was updated successfully, but these errors were encountered: