<s>
GNU	B-Application
Readline	I-Application
is	O
a	O
software	B-Library
library	I-Library
that	O
provides	O
in-line	O
editing	O
and	O
history	O
capabilities	O
for	O
interactive	B-General_Concept
programs	I-General_Concept
with	O
a	O
command-line	B-Application
interface	I-Application
,	O
such	O
as	O
Bash	B-Operating_System
.	O
</s>
<s>
It	O
is	O
currently	O
maintained	O
by	O
Chet	O
Ramey	O
as	O
part	O
of	O
the	B-Application
GNU	I-Application
Project	I-Application
.	O
</s>
<s>
It	O
allows	O
users	O
to	O
move	O
the	O
text	O
cursor	O
,	O
search	O
the	O
command	B-Application
history	I-Application
,	O
control	O
a	O
kill	O
ring	O
(	O
a	O
more	O
flexible	O
version	O
of	O
a	O
copy/paste	O
clipboard	O
)	O
and	O
use	O
tab	O
completion	O
on	O
a	O
text	O
terminal	O
.	O
</s>
<s>
As	O
a	O
cross-platform	B-Operating_System
library	B-Library
,	O
readline	B-Application
allows	O
applications	O
on	O
various	O
systems	O
to	O
exhibit	O
identical	O
line-editing	O
behavior	O
.	O
</s>
<s>
Readline	B-Application
supports	O
both	O
Emacs	B-Application
and	O
vi	B-Application
editing	O
modes	O
,	O
which	O
determine	O
how	O
keyboard	O
input	O
is	O
interpreted	O
as	O
editor	O
commands	O
.	O
</s>
<s>
Emacs	B-Application
editing	O
mode	O
key	O
bindings	O
are	O
taken	O
from	O
the	O
text	B-Application
editor	I-Application
Emacs	B-Application
.	O
</s>
<s>
:	O
Sends	O
the	O
signal	O
SIGINT	B-General_Concept
via	O
pseudoterminal	B-Protocol
to	O
the	O
current	O
task	O
,	O
which	O
aborts	O
and	O
closes	O
it	O
.	O
</s>
<s>
Sends	O
an	O
EOF	O
marker	O
,	O
which	O
(	O
unless	O
disabled	O
by	O
an	O
option	O
)	O
closes	O
the	O
current	O
shell	O
(	O
equivalent	O
to	O
the	O
command	O
exit	B-Device
)	O
.	O
</s>
<s>
:	O
(	O
end	B-Device
)	O
moves	O
the	O
cursor	O
to	O
the	O
line	O
end	B-Device
(	O
equivalent	O
to	O
the	O
key	O
)	O
.	O
</s>
<s>
:	O
Clears	O
the	O
screen	O
content	O
(	O
equivalent	O
to	O
the	O
command	O
clear	B-Device
)	O
.	O
</s>
<s>
:	O
Edits	O
the	O
current	O
line	O
in	O
the	O
$EDITOR	O
program	O
,	O
or	O
vi	B-Application
if	O
undefined	O
.	O
</s>
<s>
:	O
Read	O
in	O
the	O
contents	O
of	O
the	O
inputrc	B-Application
file	O
,	O
and	O
incorporate	O
any	O
bindings	O
or	O
variable	O
assignments	O
found	O
there	O
.	O
</s>
<s>
:	O
Display	O
version	O
information	O
about	O
the	O
current	O
instance	O
of	O
Bash	B-Operating_System
.	O
</s>
<s>
(	O
C-x	O
,	O
because	O
x	O
has	O
a	O
crossing	O
shape	O
)	O
.	O
</s>
<s>
:	O
Sends	O
the	O
signal	O
SIGTSTP	B-General_Concept
to	O
the	O
current	O
task	O
,	O
which	O
suspends	O
it	O
.	O
</s>
<s>
:	O
Capitalizes	O
the	O
character	O
under	O
the	O
cursor	O
and	O
moves	O
to	O
the	O
end	B-Device
of	O
the	O
word	O
.	O
</s>
<s>
:	O
Lowers	O
the	O
case	O
of	O
every	O
character	O
from	O
the	O
cursor	O
's	O
position	O
to	O
the	O
end	B-Device
of	O
the	O
current	O
word	O
.	O
</s>
<s>
:	O
Capitalizes	O
every	O
character	O
from	O
the	O
cursor	O
's	O
position	O
to	O
the	O
end	B-Device
of	O
the	O
current	O
word	O
.	O
</s>
<s>
GNU	B-Application
Readline	I-Application
is	O
notable	O
for	O
being	O
a	O
free	B-Application
software	I-Application
library	B-Library
which	O
is	O
licensed	O
under	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
(	O
GPL	B-License
)	O
.	O
</s>
<s>
Free	B-Application
software	I-Application
libraries	O
are	O
far	O
more	O
often	O
licensed	O
under	O
the	O
GNU	B-Application
Lesser	I-Application
General	I-Application
Public	I-Application
License	I-Application
(	O
LGPL	B-Application
)	O
,	O
for	O
example	O
,	O
the	O
GNU	B-Language
C	I-Language
Library	I-Language
,	O
GNU	B-Application
gettext	I-Application
and	O
FLTK	B-Language
.	O
</s>
<s>
A	O
developer	O
of	O
an	O
application	O
who	O
chooses	O
to	O
link	O
to	O
an	O
LGPL	B-Application
licensed	O
library	B-Library
can	O
use	O
any	O
license	O
for	O
the	O
application	O
.	O
</s>
<s>
But	O
linking	O
to	O
a	O
GPL	B-License
licensed	O
library	B-Library
such	O
as	O
Readline	B-Application
requires	O
the	O
entire	O
combined	O
resulting	O
application	O
to	O
be	O
licensed	O
under	O
the	O
GPL	B-License
when	O
distributed	O
,	O
to	O
comply	O
with	O
section	O
5	O
of	O
the	O
GPL	B-License
.	O
</s>
<s>
This	O
licensing	O
was	O
chosen	O
by	O
the	O
FSF	O
on	O
the	O
hopes	O
that	O
it	O
would	O
encourage	O
software	O
to	O
switch	O
to	O
the	O
GPL	B-License
.	O
</s>
<s>
An	O
important	O
example	O
of	O
an	O
application	O
changing	O
its	O
licensing	O
to	O
comply	O
with	O
the	O
copyleft	O
conditions	O
of	O
GNU	B-Application
Readline	I-Application
is	O
CLISP	B-Application
,	O
an	O
implementation	O
of	O
Common	B-Language
Lisp	I-Language
.	O
</s>
<s>
Originally	O
released	O
in	O
1987	O
,	O
it	O
changed	O
to	O
the	O
GPL	B-License
license	I-License
in	O
1992	O
,	O
after	O
an	O
email	O
exchange	O
between	O
one	O
of	O
CLISP	B-Application
's	O
original	O
authors	O
,	O
Bruno	O
Haible	O
,	O
and	O
Richard	O
Stallman	O
,	O
in	O
which	O
Stallman	O
argued	O
that	O
the	O
linking	O
of	O
readline	B-Application
in	O
CLISP	B-Application
meant	O
that	O
Haible	O
was	O
required	O
to	O
re-license	O
CLISP	B-Application
under	O
the	O
GPL	B-License
if	O
he	O
wished	O
to	O
distribute	O
the	O
implementation	O
of	O
CLISP	B-Application
which	O
used	O
readline	B-Application
.	O
</s>
<s>
Alternative	O
libraries	O
have	O
been	O
created	O
with	O
other	O
licenses	O
so	O
they	O
can	O
be	O
used	O
by	O
software	O
projects	O
which	O
want	O
to	O
implement	O
command	B-Application
line	I-Application
editing	O
functionality	O
,	O
but	O
be	O
released	O
with	O
a	O
non-GPL	O
license	O
.	O
</s>
<s>
Many	O
BSD	O
systems	O
have	O
a	O
BSD-licensed	B-Operating_System
libedit	O
.	O
</s>
<s>
MariaDB	B-Application
and	O
PHP	B-Application
allow	O
for	O
the	O
user	O
to	O
select	O
at	O
build	O
time	O
whether	O
to	O
link	O
with	O
GNU	B-Application
Readline	I-Application
or	O
with	O
libedit	O
.	O
</s>
<s>
linenoise	O
is	O
a	O
tiny	O
C	B-Language
library	B-Library
that	O
provides	O
line	O
editing	O
functions	O
.	O
</s>
<s>
Haskeline	O
is	O
a	O
readline-like	O
library	B-Library
for	O
Haskell	O
.	O
</s>
<s>
It	O
is	O
mainly	O
written	O
for	O
the	B-Application
Glasgow	I-Application
Haskell	I-Application
Compiler	I-Application
,	O
but	O
is	O
available	O
to	O
other	O
Haskell	O
projects	O
which	O
need	O
line-editing	O
services	O
as	O
well	O
.	O
</s>
<s>
The	O
following	O
code	O
is	O
in	O
C	B-Language
and	O
must	O
be	O
linked	O
against	O
the	O
readline	B-Application
library	B-Library
by	O
passing	O
a	O
flag	O
to	O
the	O
compiler	O
:	O
</s>
<s>
Perl	O
's	O
third-party	O
(	O
CPAN	O
)	O
module	O
,	O
specifically	O
for	O
GNU	B-Application
ReadLine	I-Application
.	O
</s>
<s>
Support	O
for	O
readline	B-Application
alternatives	O
differ	O
among	O
these	O
bindings	O
.	O
</s>
