Open k8s-gpubuilder-markus opened 2 years ago
If you bring up the command palette with :
you can hit q
to quit. That's in line with almost all other commands that are possible within the app (see key bindings).
I think the only time they use keys without modifiers is for direct contextual actions. For instance, if you're looking at a Pod, you can do a few things:
d
= describee
= editl
= view logss
= get a shellWhy do I have to use : ? How can this ever make sense to anybody else than a VIM user? Any app should provide a easy intuitive way to quit it, which is normally q or ESC. Intuitive as in: I don't have to RTFM to know this. In my opinion, quitting an app is an universal function that must always be available. Would you mind making k9s usable for a wider audience of users by adding the q option?
Perhaps this should be a matter of clearly documenting or otherwise advertising how to quit? I think the criticism of vim from new users is not how you quit, but rather it not communicating how to do so.
Just want to cover all options in case others agree with the command palette approach. As a heads up, you can also quit with ctrl+c
.
I just want to chime in that I also expected q
to quit the app, as nothing in the default GUI told me otherwise, only attach, describe, kill etc. Nor did anything tell me about the :
command palette, unless I opened "help" (which also told me how to quit it).
If q
is not bound to anything currently, would it be possible to bind it to quit? Or bind a "help" function to it, to tell a user how to quit? Or if it can be a "misclick" often, maybe require confirmation (press q again to quit).
A lot of terminal tooling taking up the full terminal session supports quitting with q
, such as less(1), top(1), man(1), tig(1).
I would be willing to contribute this feature if it can be accepted.
Any app should provide a easy intuitive way to quit it, which is normally q or ESC. I
provide examples? I do not think there is a universal method that always works. Curses application typically all have various bespoke methods and at least Vim is a well known bespoke method. ALT-F4 will not work. Lets enumerate those few applications that I still use or "recently" used.
nano
uses CTRL-X to quit. ctrl-c will not work!mc
midnight commander is F10 (which has its own challenges in a desktop terminal which captures F10 typically.). ctrl-c will not work!top
/htop
uses "q" to close the application. but ESC and CTRL-X does nothing. CTRL-C however closes the appaws-shell
uses F10 or ".quit" to quit. ctrl-c will not work, however empty line ctrl-d will work!mutt
uses "q" to quit, unexpectedly. neither ":quit" nor ":exit" will work. ctrl-c will quit with confirmation.tig
both :quit and Q will work, as well as CTRL-Cranger
q or Q will quit the application as well as CTRL-C (same as tig
)irssi
irc client: only /quit will work (ctrl-c does nothing)k9s
: ctrl-c and :quit will quit the application. Q does nothing. note that CTRL-C is undocumented way to quit?bmon
: q will quit with confirmation. ctrl-c quits w/o confirmation.emacs
: ctrl-x ctrl-c (that is the oddest one of them all IMHO)One way an app can become "intuitive" is by properly documenting it, for example nano just plainly says how to exit on screen.
I see CTRL - C as a non clean way to terminate an app: most more advanced apps will not allow it, as it is mostly a convention for CLI tools to terminate them. In a GUI tool, CTRL - C will be mapped to copy (paste).
The k9s header always show the "help" shortcut which then shows how to quit (displays ":q" in the help screen). Might not be the most intuitive, but it is at least documented in the UI.
Could an entry for "quit" always displaying in the header help? Alternatively, it seems "q" is currently unbound so it could certainly bound as a dedicated "quit" key. Not sure how I feel about both "q" and ":q" being used, if "q" is added should the other be removed?
With hotkey
features, it works by adding this snippet to $HOME/.config/k9s/hotkeys.yaml
: (path may differ)
hotKeys:
quit-app:
shortCut: q
description: Quit
command: quit
Just to add a little bit of nuance to this issue as a complete k9s noob: I expected q
to close whatever thing I just opened, but not exit the entire app – like escape does now.
For example, after hitting ?
to bring up Help, I intuitively tried to get back to what I was looking at by hitting q
.
To me, at least, defaulting q
to exit the whole app would be very unexpected.
Edit: Apparently at least some people agree with me: https://github.com/derailed/k9s/issues/832
Could you make it possible to use q for quitting the app like it is the standard on pretty much any other Linux app?
So far I had to do CTRL C to get out of it. Quitting should be really easy and intuitive.