[personal profile] lmemsm
So, once again I find myself looking for a replacement to readline for programs that might not be licensed in a way that is GPL compatible. The main alternatives to readline are editline, libedit, linenoise, libtecla and isocline.

linenoise is not compatible with the readline API. You'd need to rewrite the application to work with it. It is recommended by many developers who prefer minimalist software. There are two forks of linenoise that offer better UTF-8 support and work on various platforms including Windows. These alternatives are replxx and linenoise-ng. linenoise is a C library while replxx and linenoise-ng are written in C++. linenoise uses a BSD 2 clause license while the forks use a BSD 3 clause style license. Check the following links for more information:
https://github.com/antirez/linenoise
https://github.com/AmokHuginnsson/replxx
https://github.com/arangodb/linenoise-ng

libtecla is available at:
http://www.astro.caltech.edu/~mcs/tecla/index.html
It provides command line editing similar to tcsh. It uses a X11 style license. Does not look like it's compatible as a drop-in replacement for readline.

isocline is available at:
https://github.com/daanx/isocline
It works cross-platform. It has an MIT license. I'm assuming it's not a drop in replacement.

editline was the first choice if someone wanted a replacement for readline. It's compact and offers some compatibility with readline functions. The code was released under a Free license similar to a BSD license. However, I'm unable to determine if that license is compatible with the GPL. There's a copy of the original code that has been reliscensed by the developer using the Apache 2.0 license at:
https://github.com/richsalz/editline
There have been several forks of editline. editline was adopted by Minix at some point and some forks are known as Minix Editline. One popular fork based on the Minix code is:
https://github.com/troglobit/editline
There are several forks of it. Some are mentioned here:
http://troglobit.com/projects/editline/
Debian has there own fork of it with their patches:
https://packages.debian.org/sid/libeditline-dev
The Festival speech-tools fork includes support for Windows.

There's a Windows specific implementation of editline that was rewritten from scratch:
http://mingweditline.sourceforge.net/
It uses a BSD 3 clause license. It doesn't have full compatibility with the readline API. I had to patch it and add a few functions for it to work with sdcv in place of readline. However, it does work better on Windows than the other options.

There's a libedit fork based on NetBSD's libedit which was also based on the original editline previously mentioned. It's currently licensed with the BSD 3 clause license. It's at:
http://thrysoee.dk/editline/
The Debian version with their patches is here:
https://packages.debian.org/buster/libedit-dev
libedit has more code than editline, but it's also supposed to have better internationalization support and provides an alternative API that's more compatible with readline.

So the trick is to find the most portable library with a compatible license and enough API compatiblity to replace readline when building various Open Source applications. None of the options seem to give both portability and good support for emulating the readline API. One would most likely need to pick an option that has the most compatible license support and then patch it to add better internationalization and cross-platform support. I'm investigating this further and hope to come up with something I can use as a drop-in replacement for various programs that typically use readline.

If you have other recommendations for readline alternatives, please let me know: http://www.distasis.com/contact.htm

April 2025

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 28th, 2025 09:43 pm
Powered by Dreamwidth Studios