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

Quick jump to selected namespace passed as a parameter to :namespace command #2663

Closed
zoulja opened this issue Apr 19, 2024 · 4 comments
Closed
Labels
AsDesigned Works as designed question Further information is requested

Comments

@zoulja
Copy link

zoulja commented Apr 19, 2024




Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
it's more a usability issue:
when we switch namespace using ":namespace" command it seems support parameters, as it include autocompletion when I type ":namespace part_of_namespace_name"
But even it suggests me correct namespace(I have plenty of them) nothing happens after pressing Enter - it just stays in Namespaces menu and I still have to scroll down to select desired namespace

Describe the solution you'd like
A clear and concise description of what you want to happen.
When namespace name is passed to ":namespace" command - K9s must switch to this namespace immediately instead of just showing list of namespaces

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Don't have alternatives

Additional context
Add any other context or screenshots about the feature request here.

@derailed
Copy link
Owner

@zoulja You should use :pod ns-xxx if the intent is to list pods in a given namespace.

@derailed derailed added question Further information is requested AsDesigned Works as designed labels Apr 23, 2024
@zoulja
Copy link
Author

zoulja commented Apr 23, 2024

@zoulja You should use :pod ns-xxx if the intent is to list pods in a given namespace.

Thanks for letting me know that @derailed

My concern is that :namespace command already provides autocomplete for namespace name!
And the expected result should be the same as I would switch namespace in old-school way - see pods/deployments/etc

We really have a lot of namespaces and such approach would be really faster than search/filter by /
So the only thing to make is intuitive and consistent - just add proper Enter press handling, when name already autosuggested

Thanks in advance 🙏

@merusso
Copy link

merusso commented Jul 26, 2024

I didn't know about :pod my-namespace syntax until now, very handy!

@zoulja , when I run :ns my-namespace, it's effectively the same as running :pod my-namespace -- it shows a list of pods in "my-namespace".

Are you asking specifically about auto-complete? Are you pressing tab to complete the auto-completion suggestion?

@zoulja
Copy link
Author

zoulja commented Aug 5, 2024

Seems to work now

@zoulja zoulja closed this as completed Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AsDesigned Works as designed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants