On Tue, Feb 24, 2015 at 7:12 PM, Andreas Kupries <andreask at activestate.com>
wrote:

> A possible (and small alternative) to readline would be Antirez
> "linenoise".
> Steve Bennet's fork adds windows portability and some other things.
>
>     https://github.com/antirez/linenoise
>     https://github.com/msteveb/linenoise
>
> That is small enough to be directly built as part of the shell, I believe.
>

i can +1 that - been using it in several trees since ... seems like a year
or more. The only minor oddity of its build is that it requires C99.

editline is not as well-known on Linux systems, and rarely (if ever)
preinstalled, whereas linenoise is easy to embed in one's project.

Linenoise example:

http://fossil.wanderinghorse.net/r/libfossil/dir/s2

the Makefile uses the linenoise directory (copied 1-to-1 from the github
repo) to link linenoise in to that app (shell.c). Grep the makefile and
shell.c for "linenoise" to see the compile flags and API uses (essentially
identical to the basic readline API).

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf

Reply via email to