Hacker News new | ask | show | jobs
by technomancy 5429 days 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.

1 comments

linenoise[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