-
Notifications
You must be signed in to change notification settings - Fork 353
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
Add support for aliases #24
Comments
This feature is available in kubectl with Thanks for this suggestion, but I think the contexts should stay in the kubeconfig files so the logic for updating the prompt can stay intact. You could remap your aliases if you want with an array possibly, then just add it to your prompt with something like this: my_kube_ps1_alias() { PS1='\u @ \h $(my_kube_ps1_alias |
Thanks, |
No problem, thanks for using the prompt! |
When using kube-ps1 the prompt can be very long as seen in this example:
It would be great if one could create a shorter alias for the context (and possibly namespace as well).
For example:
KUBE_PS1_CONTEXT_ALIASES='gke_xxxxxxxxxxxxxxxxxxxxxxx_europe-west1-c_prod=prod, another_context=another'
thus rendering only
prod
instead ofgke_xxxxxxxxxxxxxxxxxxxxxxx_europe-west1-c_prod
andanother
instead ofanother_context
as context name in the prompt.The text was updated successfully, but these errors were encountered: