NameDateSize

..20-Dec-201616

ChangeLogH A D18-Aug-20161.3 KiB

config.h.inH A D18-Aug-20169.1 KiB

configureH A D18-Aug-2016149.7 KiB

configure.inH A D18-Aug-20168.8 KiB

extern.hH A D18-Aug-20161.2 KiB

Makefile.inH A D18-Aug-20164.9 KiB

os.hH A D18-Aug-201612 KiB

pty.cH A D18-Aug-20168 KiB

READMEH A D18-Aug-20162.8 KiB

rlfe.cH A D18-Aug-201619.4 KiB

screen.hH A D18-Aug-201660

README

1rlfe (ReadLine Front-End) is a "universal wrapper" around readline.
2You specify an interactive program to run (typically a shell), and
3readline is used to edit input lines.
4
5There are other such front-ends; what distinguishes this one is that
6it monitors the state of the inferior pty, and if the inferior program
7switches its terminal to raw mode, then rlfe passes your characters
8through directly.  This basically means you can run your entire
9session (including bash and terminal-mode emacs) under rlfe.
10
11FEATURES
12
13* Can use all readline commands (and history) in commands that
14read input lines in "canonical mode" - even 'cat'!
15
16* Automatically switches between "readline-editing mode" and "raw mode"
17depending on the terminal mode.  If the inferior program invokes
18readline itself, it will do its own line editing.  (The inferior
19readline will not know about rlfe, and it will have its own history.)
20You can even run programs like 'emavs -nw' and 'vi' under rlfe.
21The goal is you could leave rlfe always on without even knowing
22about it.  (We're not quite there, but it works tolerably well.)
23
24* The input line (after any prompt) is changed to bold-face.
25
26INSTALL
27
28The usual: ./configure && make && make install
29
30Note so far rlfe has only been tested on GNU Linux (Fedora Core 2)
31and Mac OS X (10.3).
32
33This assumes readline header files and libraries are in the default
34places.  If not, you can create a link named readline pointing to the
35readline sources.  To link with libreadline.a and libhistory.a
36you can copy or link them, or add LDFLAGS='-/path/to/readline' to
37the make command-line.
38
39USAGE
40
41Just run it.  That by default runs bash.  You can run some other
42command by giving it as command-line arguments.
43
44There are a few tweaks:  -h allows you to name the history file,
45and -s allows you to specify its size.  It default to "emacs" mode,
46but if the the environment variable EDITOR is set to "vi" that
47mode is chosen.
48
49ISSUES
50
51* The mode switching depends on the terminal mode set by the inferior
52program.  Thus ssh/telnet/screen-type programs will typically be in
53raw mode, so rlfe won't be much use, even if remote programs run in
54canonical mode.  The work-around is to run rlfe on the remote end.
55
56* Echo supression and prompt recognition are somewhat fragile.
57(A protocol so that the o/s tty code can reliably communicate its
58state to rlfe could solve this problem, and the previous one.)
59
60* See the intro to rlfe.c for more notes.
61
62* Assumes a VT100-compatible terminal, though that could be generalized
63if anybody cares.
64
65* Requires ncurses.
66
67* It would be useful to integrate rlfe's logic in a terminal emulator.
68That would make it easier to reposition the edit position with a mouse,
69integrate cut-and-paste with the system clipboard, and more robustly
70handle escape sequence and multi-byte characters more robustly.
71
72AUTHOR
73
74Per Bothner <per@bothner.com>
75
76LICENSE
77
78GPL.
79