4 ms·
> For one-line text entry, support readline bindings (^W, ^U, ^Y, ^B, ^F, etc.) Better yet, don't try to emulate readline--just use readline itself. > spawn $
by technomancy 15y ago
> For one-line text entry, support readline bindings (^W, ^U, ^Y, ^B, ^F, etc.)
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.
- kemayo 15y agolinenoise[1] is a fairly small readline alternative which seems to be gaining some traction. I know that one of the more common objections I've seen to using readline in some smallish utility is that it's a pretty big library, so that might help out. 1: https://github.com/antirez/linenoise https://github.com/antirez/linenoise