Minix Editline
This is a line editing library for UNIX. It can be linked into almost any program to provide command line editing and history. It is call compatible with the FSF readline library, but is a fraction of the size (and offers fewer features).
The small size (<30k), lack of dependencies (no ncurses needed!) and the free license should make this library interesting to many embedded developers seeking a replacement for the GNU readline library.
Since the 2.0 release editline is UTF-8 aware: cursor movement, deletion, word motion, and wrapped-line redisplay all work on whole glyphs rather than bytes. Other features:
- Emacs-style line editing with rebindable keys
- Command history, saved to and restored from a file, with a scrollback size you can change at runtime
- TAB completion, with a hook for your own completer
- A callback interface for use from an event loop
- An FSF readline compatibility layer, so many programs build unchanged
Configuration is made by supplying different options to the GNU configure script. In the examples/ directory you can find some small code snippets used for testing.
Issue tracker and GIT repository available at GitHub:
- Repository
- Issue Tracker
- ChangeLog
- Releases (source tarballs and release notes)
See also the OpenHub page, or the old Free(code) page.
Origin & References
The editline library was created by Simmule Turner and Rich Salz back in 1992. At the time they chose to distribute the code under a “C News-like” copyright, see the file LICENSE for details. Today Rich distributes the original sources under the Apache 2.0 license. The version distributed here, however, continues to use the original license.
This version of the editline library is the continuation of the Minix3 sources, where it is called libedit. Other known versions, often based on the original comp.sources.unix posting are:
- Debian libeditline
- Heimdal, in heimdal/lib/editline/
- Festival speech-tools, in speech-tools/siod/
- Steve Tell’s editline patches
The most interesting patches and bug fixes from each fork have been merged here. Outstanding issues are listed in the TODO file.