Is there a simple alternative to Readline?

Justin Poliey picture Justin Poliey · Dec 10, 2009 · Viewed 13.7k times · Source

On a project I'm working on, I'm trying to make it accept user commands and provide history with the up arrow. I'm aiming to keep this project free of dependencies, and I don't want to have to require people to also install the readline development files just to compile my project. Does anyone know of a simple drop-in replacement for GNU Readline that provides only simple functionality?

Answer

Jason Orendorff picture Jason Orendorff · Dec 10, 2009

Editline. It has a BSD-style license.

EDIT: Older versions of editline were quite simple. Here's one with just two C files and a header, a total of about 1500 lines of code. We've been using it for years.