Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Already discussed on HN: GNU readline, BSD editline, rlwrap and linenoise. I suspect enhance and libtecla have been discussed too (alternatives to rlwrap and readline).

For example: https://news.ycombinator.com/item?id=5086837

Both editline and readline are large, too large to be compiled into every program that could benefit from REPL.

The answer to the bloat is linenoise. Great project.

But then there are all the programs that already have the readline bloat compiled in. How to replace it with something smaller? Can this be done?

There is another editline, not NetBSD's editline. It may predate the web, as it was originally distributed via Usenet. I do not recall it ever being discussed on HN. I suspect the original author probably has an HN account.

From Github:

   *call compatible with GNU readline*

   small size (<30K)

   originally developed for older UNIX and Plan 9

   forked from Minix 3, not related to NetBSD editline

   does not rely on libtermcap/curses
source: https://github.com/troglobit/editline

socat can function as a replacement for rlwrap, something like:

   socat -t0 readline exec:q
where "q" is a program that could benefit from a REPL.

Perceptually I find socat readline exits faster than rlwrap. The later always feels a bit sluggish. Same for libtecla's enhance.

Is there a linenoise-based replacement for rlwrap?



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: