Show namespace shortcuts in the header, k9s-style #474
Closed
MichaelKlank
started this conversation in
Ideas
Replies: 1 comment 2 replies
|
Configured namespace shortcuts are already shown beside I would keep |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
1-9already select a namespace and0selects all namespaces, but themapping is only visible inside the namespace popup (
n). On the resourcetable -- the one view where those keys apply -- there is no way to see which
digit goes where, so the shortcuts are effectively undiscoverable. k9s keeps
this mapping permanently in the header, which is where people coming from k9s
look for it.
The digits also do nothing at all until
favorite_namespacesis configured,which most users never find either.
Proposal
0 <all>plus every bounddigit, with the active namespace highlighted. It is the first block dropped
when the terminal narrows, since
nstill lists the same mapping while theper-kind hints have no second home.
1-9fall back to the namespaces you visit for the slotsfavorite_namespacesleaves open, so the digits do something out of thebox. A configured favourite never loses its slot.
what the header shows is always what the key does.
Open questions
information is available in
n. If the answer is "the switcher is enough",that is a fine outcome and I will drop it.
a digit can point at a different namespace the next time you look. That
seemed wrong for a mapping the header advertises permanently, so the
prototype hands a slot out once and keeps it: a new namespace takes a free
slot, and only a full list gives one up -- that of its least recently used
entry. Is that the behaviour you want, or would you rather match k9s exactly?
key hints, 40 for a second column once more than five digits are bound. Below
that it folds away entirely. Is folding acceptable, or should it be a config
toggle instead?
compact header (
ctrl-e)? The prototype leaves compact mode untouched.Status
I have a working prototype in #469, including docs and tests. That was out of
order --
AGENTS.mdasks for the discussion first, and I opened the PR beforethis. Happy to close it, rework it to whatever scope is agreed here, or leave
it as a reference for what the change looks like in practice.
All reactions