|
Besides the technical details, there are good practices which should be followed, but I don't know of any document which lists them. This is a pity, because though text-based interfaces are often designed in a much more efficient way than GUI interfaces, they are seldom consistent between themselves, and often get something wrong. A few common ones: - 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. |
Better yet, don't try to emulate readline--just use readline itself.
> spawn $PAGER to show text and $EDITOR to edit text.
If you're old school enough, honor $VISUAL and fall back to $EDITOR if it's not set.