1
1
Fork
You've already forked rledit
0
Use GNU Readline as a text editor
  • C 90.6%
  • Makefile 9.4%
Find a file
2026年06月29日 10:28:54 +00:00
COPYING Import initial version 2026年03月30日 21:52:42 +01:00
Makefile Import initial version 2026年03月30日 21:52:42 +01:00
README Return to rledit after C-x C-e for final confirmation 2026年05月20日 15:29:42 +00:00
rledit.c Catch unlikely errors from lseek() and ftruncate() 2026年06月29日 10:28:54 +00:00

rledit
======
rledit is a command-line wrapper for GNU Readline to allow it to be used
as a simple multi-line text editor.
Edit a file with 'rledit FILE', or use 'rledit' without arguments within
a pipe to intercept and edit text in the style of 'vipe'. In particular,
you can set EDITOR to 'rledit' to use it as a super-lightweight editor
where only a few words of input are likely.
Pressing RET will confirm your input, equivalent to saving and exiting in
a regular text editor. To insert a newline instead, use S-RET, C-RET, M-RET
or C-j. Not all of these bindings will be supported in every terminal.
To edit your text in a more full-featured editor, use C-x C-e, as in
bash. rledit will try to switch to $VISUAL, $EDITOR, or vi, in order
of preference.
BSD libedit/editline
--------------------
Although libedit has a readline compatibility interface, it is not complete
enough to build rledit. Libedit also misbehaves with buffers containing
embedded newlines. You can test this by inserting literal newlines with
C-v C-j at a prompt, comparing programs linked against readline vs libedit.
Building and installing
-----------------------
Run 'make install' at the top of the source tree to install rledit in /bin.
Alternatively, you can set DESTDIR and/or BINDIR to install in a different
location, or make, strip and copy the binary into place manually.
The program should be portable to any reasonably modern POSIX system with
the readline library available, including Linux and BSD, but it will not
work with libedit's readline compatibility interface.
Please report any problems or bugs to Chris Webb <chris@arachsys.com>.
Copying
-------
This software was written by Chris Webb <chris@arachsys.com> and is
distributed as Free Software under the terms of the MIT license in COPYING.
However, GNU Readline is distributed under version 3 of the GNU GPL,
so binaries linked against it must also be distributed under those terms.