-
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
Trim cluster name & namespace name #53
Comments
For the cluster, you can do a rename (alias) with kubectl: For the namespace, you can set up an alias in your dotfiles if necessary, but I dont want to get into limiting the name to a character limit; these names can provide a lot of information and you can always do an alias if necessary. my_kube_ps1_alias() {
case $1 in
super-long-name) echo short;;
*) echo $1;;
esac
}
PS1='\u @ \h $(my_kube_ps1_alias $KUBE_PS1_CONTEXT) $>' Check #24 as well. |
Interesting. Thanks |
|
Do you like the idea about using the alias like I proposed?
…On Tue, May 22, 2018 at 10:53 AM, Max Lobur ***@***.***> wrote:
these names can provide a lot of information - I know, that's why I
propose an option (disabled by default). For our env with lots of clusters
I always know that 1st 10 chars will show where am I, so I would use it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#53 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB4RQPoyBO9iHlkLNjwzpf6OjfDwVHuVks5t1CZYgaJpZM4UIubf>
.
|
Should work for me |
Great, thanks for using this prompt! |
For long cluster names & namespaces it takes a lot of space in a prompt:
(kubernetes.us-west-2.dev.subenv.company.domain:application.namepsace)~prompt$
Two options can be introduced:
setting both to 10 will end to:
(kube.us-we..:applicatio..)~prompt$
default: -1 (no trim)
The text was updated successfully, but these errors were encountered: