1157184Sacherlfe (ReadLine Front-End) is a "universal wrapper" around readline.
2157184SacheYou specify an interactive program to run (typically a shell), and
3157184Sachereadline is used to edit input lines.
4157184Sache
5157184SacheThere are other such front-ends; what distinguishes this one is that
6157184Sacheit monitors the state of the inferior pty, and if the inferior program
7157184Sacheswitches its terminal to raw mode, then rlfe passes your characters
8157184Sachethrough directly.  This basically means you can run your entire
9157184Sachesession (including bash and terminal-mode emacs) under rlfe.
10157184Sache
11157184SacheFEATURES
12157184Sache
13157184Sache* Can use all readline commands (and history) in commands that
14157184Sacheread input lines in "canonical mode" - even 'cat'!
15157184Sache
16157184Sache* Automatically switches between "readline-editing mode" and "raw mode"
17157184Sachedepending on the terminal mode.  If the inferior program invokes
18157184Sachereadline itself, it will do its own line editing.  (The inferior
19157184Sachereadline will not know about rlfe, and it will have its own history.)
20157184SacheYou can even run programs like 'emavs -nw' and 'vi' under rlfe.
21157184SacheThe goal is you could leave rlfe always on without even knowing
22157184Sacheabout it.  (We're not quite there, but it works tolerably well.)
23157184Sache
24157184Sache* The input line (after any prompt) is changed to bold-face.
25157184Sache
26157184SacheINSTALL
27157184Sache
28157184SacheThe usual: ./configure && make && make install
29157184Sache
30157184SacheNote so far rlfe has only been tested on GNU Linux (Fedora Core 2)
31157184Sacheand Mac OS X (10.3).
32157184Sache
33157184SacheThis assumes readline header files and libraries are in the default
34157184Sacheplaces.  If not, you can create a link named readline pointing to the
35157184Sachereadline sources.  To link with libreadline.a and libhistory.a
36157184Sacheyou can copy or link them, or add LDFLAGS='-/path/to/readline' to
37157184Sachethe make command-line.
38157184Sache
39157184SacheUSAGE
40157184Sache
41157184SacheJust run it.  That by default runs bash.  You can run some other
42157184Sachecommand by giving it as command-line arguments.
43157184Sache
44157184SacheThere are a few tweaks:  -h allows you to name the history file,
45157184Sacheand -s allows you to specify its size.  It default to "emacs" mode,
46157184Sachebut if the the environment variable EDITOR is set to "vi" that
47157184Sachemode is chosen.
48157184Sache
49157184SacheISSUES
50157184Sache
51157184Sache* The mode switching depends on the terminal mode set by the inferior
52157184Sacheprogram.  Thus ssh/telnet/screen-type programs will typically be in
53157184Sacheraw mode, so rlfe won't be much use, even if remote programs run in
54157184Sachecanonical mode.  The work-around is to run rlfe on the remote end.
55157184Sache
56157184Sache* Echo supression and prompt recognition are somewhat fragile.
57157184Sache(A protocol so that the o/s tty code can reliably communicate its
58157184Sachestate to rlfe could solve this problem, and the previous one.)
59157184Sache
60157184Sache* See the intro to rlfe.c for more notes.
61157184Sache
62157184Sache* Assumes a VT100-compatible terminal, though that could be generalized
63157184Sacheif anybody cares.
64157184Sache
65157184Sache* Requires ncurses.
66157184Sache
67157184Sache* It would be useful to integrate rlfe's logic in a terminal emulator.
68157184SacheThat would make it easier to reposition the edit position with a mouse,
69157184Sacheintegrate cut-and-paste with the system clipboard, and more robustly
70157184Sachehandle escape sequence and multi-byte characters more robustly.
71157184Sache
72157184SacheAUTHOR
73157184Sache
74157184SachePer Bothner <per@bothner.com>
75157184Sache
76157184SacheLICENSE
77157184Sache
78157184SacheGPL.
79