k9s icon indicating copy to clipboard operation
k9s copied to clipboard

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

Open zoulja opened this issue 1 year ago • 2 comments




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.

zoulja avatar Apr 19 '24 10:04 zoulja

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

derailed avatar Apr 23 '24 13:04 derailed

@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 🙏

zoulja avatar Apr 23 '24 20:04 zoulja

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?

merusso avatar Jul 26 '24 20:07 merusso

Seems to work now

zoulja avatar Aug 05 '24 07:08 zoulja