![]() |
![]()
| ![]() |
![]()
NAME
LIBRARYlibrary “libeditline” SYNOPSIS
char *
void
int
int
DESCRIPTION
The
Each line returned is automatically saved in the
internal history list, unless it happens to be equal to the previous line.
This is configurable if you are building editline from source, i.e. if you
would rather like to call
The
User InterfaceA program that uses this library provides a simple emacs-like
editing interface to its users. A line may be edited before it is sent to
the calling program by typing either control characters or escape sequences.
A control character, shown as a caret followed by a letter, is typed by
holding down the control key while the letter is typed. For example,
An editing command may be typed anywhere on the line, not just at the beginning. In addition, a return may also be typed anywhere on the line, not just at the end. Most editing commands may be given a repeat count,
n, where n is a number. To enter
a repeat count, type the escape key, the number, and then the command to
execute. For example, The following control characters are accepted:
The following escape sequences are provided:
The ^A^Kecho
'^V^[[H^V^[[2J'^M Then typing The bin vmunix core vmunix.old If you type The tab key is shown by [TAB] and the automatically-entered text is shown in italics, or underline. USAGETo include ExampleThe following brief example lets you enter a line and edit it, then displays it. #include <stdio.h> #include <stdlib.h> #include <editline.h> int main(void) { char *p; while ((p = readline("CLI> "))) { puts(p); free(p); } return 0; } AUTHORSThe original editline library was posted to comp.sources.unix newsgroup by created by Simmule R. Turner and Rich Salz in 1992. It now exists in several forks: Debian, Minix, Heimdal, Festival speech tools, Mozilla, Google Gadgets for Linux, and many other places. The original manual page was made by David W. Sanderson. This version was originally based on the Minix 2 sources, but has since evolved to include patches from all relevant forks. It is currently maintained by Joachim Nilsson at GitHub, ⟨http://github.com/troglobit/editline⟩ BUGSDoes not handle multiple lines or unicode characters well.
|