Zum Inhalt springen

GNU Readline

aus Wikipedia, der freien Enzyklopädie
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 23. Februar 2009 um 22:31 Uhr durch imported>JLP. Sie kann sich erheblich von der aktuellen Version unterscheiden.
GNU Readline

Basisdaten

Maintainer Chet Ramey[1]
Entwickler GNU-Projekt, Brian Fox, Chet Ramey
Aktuelle Version 8.3[2]
(3. Juli 2025)
Aktuelle Vorabversion 8.3-alpha[3]
(22. April 2024)
Betriebssystem GNU/Linux[1], BSD-Betriebssystem[1], macOS[1], Microsoft Windows[1], Unix-ähnliches System, Plattformunabhängig
Programmier­sprache C
Lizenz GNU General Public License v3.0 or later[1]
www.gnu.org/software/readline/

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 6.0. 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.

Criticism

There are several bugs and limitations, making readline difficult to use by third party applicationsVorlage:Fact. 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.

See also

Portal: Free software – Free Software Portal Logo.svg

Vorlage:GNU

  1. a b c d e f In: Free Software Directory.
  2. Chet Ramey: Readline-8.3-release available. 5. Juli 2025 (englisch, abgerufen am 5. Juli 2025).
  3. readline.git - The GNU Readline library. (abgerufen am 7. August 2024).