|
|
|
|
|
by FaceKicker
5429 days ago
|
|
Non-interactive programs get the most attention in this article, while text-based user interfaces are barely covered at all. That's disappointing, I was hoping I'd learn how vi, etc. worked from this, since I know nothing about writing command line interfaces other than input and output to the last column of the last line of the terminal. Does anyone know of a good article/introduction to this? |
|
- Don't make the user reach for distant keys like escape or pagedown/pageup (also support ^N/^P or ^B/^F) or the arrow keys (also support hjkl), unless you really need to.
- For one-line text entry, support readline bindings (^W, ^U, ^Y, ^B, ^F, etc.)
- If you show a list, provide a way to search for an item rather than moving through the list item by item or page by page.
- Unless there is a good reason not to, spawn $PAGER to show text and $EDITOR to edit text.
- If there is a finite set of actions to choose from, provide one-key hotkeys for each one. Don't require unnecessary use of the control key. Optionally show the list of possible or common actions, but have an option to hide it and save screen space for users who don't need it anymore (like mutt does). Likewise, if there are several items that can get focus, provide hotkeys, don't require the user to Tab their way through all of them.
Obviously, there are more.