GNU readline

From Wikipedia, the free encyclopedia

GNU readline
Developed by Brian Fox, Chet Ramey
Latest release 5.2 / October 11, 2006
Written in C
OS Various
License GNU General Public License
Website Official website

GNU readline is a software library created and maintained by the GNU Project. It is licensed under the GPL, and used in projects such as bash. It provides line-editing capabilities. The current version is 5.2. Newer features include multibyte (Unicode) character support.

For instance, in a readline-enabled application, pressing ctrl-b moves the cursor back one space, ctrl-f moves the cursor forward one space, and ctrl-r searches the command history. These key bindings (which are the default, although bindings like vi's are optional) are taken from one of GNU's earliest and most popular projects, the text editor Emacs. Readline supports a variety of basic features, including a kill ring (a more flexible version of a copy/paste clipboard) and tab completion. As a cross-platform library, readline allows applications on various systems to exhibit identical line-editing behavior.

Readline is customized via its configuration file that can be default (~/.inputrc) or application specific. In this file, it is possible to define custom key bindings and change some other settings.

[edit] Criticism

There are several bugs and limitations, making readline difficult to use by third party applications[citation needed]. Some features don't work as documented (for example, local echoing, which cannot be disabled), and removing key bindings is not possible. Its own manual page says, "It's too big and too slow.".

While Readline is a cross-platform library, some platforms do not include readline as part of the default system. It is, however, relatively easy to build independently.

Programs that are not distributed under the GPL usually use readline as an optional feature. Such programs would typically allow the user to specify whether or not to link with the readline library at build time.

This email exchange between Richard Stallman and Bruno Haible suggests that such steps do not necessarily allow the resulting software to escape the GPL. However, it predates the appearance of NetBSD's editline library, a BSD-licensed API-compatible implemention of the same functionality, so the argument that such software must be intended to link with readline is not as strong today.

[edit] See also

[edit] External links