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

Allow for customization of shell buffer names #121

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

murshies
Copy link
Contributor

@murshies murshies commented Dec 18, 2023

This change adds a new customizable variable, called kubel-shell-buffer-name-format. This variable defines the buffer name format for shell, ansi-term, eshell, and vterm buffers created through kubel-exec-popup. I frequently have to interact with multiple clusters and multiple namespaces in each cluster, so having the ability to add the Kubernetes context and namespace to the buffer name is useful. As explained in the documentation for kubel-shell-buffer-name-format, the following %-sequences are available:

%t: The shell type. Examples of this are shell and eshell
%c: The container name
%p: The pod name
%n: The current namespace
%C: The current context

I set the default format to "kubel:%C:%n:%t:%c@%p", which updates the shell buffer name format to match the new buffer name format after the merge of #114.

@abrochard
Copy link
Owner

Thank you for submitting this! I like the idea and will take the time to review and test.
In the meantime, I just merged #114 which was a long waiting feature. Would you mind giving it a look and seeing if there's overlap with what you're trying to do?

@murshies
Copy link
Contributor Author

murshies commented Dec 28, 2023

Thank you for submitting this! I like the idea and will take the time to review and test. In the meantime, I just merged #114 which was a long waiting feature. Would you mind giving it a look and seeing if there's overlap with what you're trying to do?

That is a great update! I tried it out and I see that the buffer name format hasn't changed for shells, so I think it would be good to still have an update like this. I did make one edit to my pull request based on #114 - I updated the default for kubel-shell-buffer-name-format so that it better matches the buffer name format that is now being used. Let me know what you think!

Copy link
Owner

@abrochard abrochard left a comment

Choose a reason for hiding this comment

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

Thank you!

@abrochard abrochard merged commit 7affc42 into abrochard:master Feb 1, 2024
2 of 4 checks passed
@murshies
Copy link
Contributor Author

murshies commented Feb 4, 2024

Thank you!

Thanks for merging! I noticed this was mentioned in #114 about customizing different buffer names. If you think doing something similar to this would be helpful for other buffer types, I'd be happy to work on that. Let me know!

@abrochard
Copy link
Owner

Thanks for merging! I noticed this was mentioned in #114 about customizing different buffer names. If you think doing something similar to this would be helpful for other buffer types, I'd be happy to work on that. Let me know!

Thank you for proposing! I think it's entirely up to you! I'm personally still playing around with the latest kubel and it works for me so far. It's a good idea but at least to me it's not urgent. So if you want to work on it, I will happily review. But really no pressure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants