Linenoise NG – a BSD licensed readline replacement with UTF8 support
For projects that are BSD or Apache 2 licensed, Linenoise (by Salvatore Sanfilippo) is a pretty small, portable GNU readline (GPL) replacement. Based on the work of Salvatore and 10gen Inc. this Linenoise NG implementation adds UTF8 and Windows support, uses a BSD license and can be used in any kind of program.
- single-line and multi-line editing mode with the usual key bindings implemented
- history handling
- BSD license source code
- Only uses a subset of VT100 escapes (ANSI.SYS compatible)
- UTF8 aware
- support for Linux, MacOS and Windows
Linenoise NG deviates from Salvatore’s original goal to have a minimal readline replacement for the sake of supporting UTF8 and Windows. It deviates from 10gen Inc.’s goal to create a C++ interface to linenoise. This library uses C++ internally, but to the user it provides a pure C interface that is compatible with the original linenoise API.
Contributions welcome! See the repository on Github for details.
Get the latest tutorials, blog posts and news: