racket/collects/readline/doc.txt
2005-05-27 18:56:37 +00:00

32 lines
933 B
Plaintext

The _readline_ collection (not to be confused with MzScheme's
`read-line' procedure) provides glue for using GNU's readline library
with the MzScheme read-eval-print-loop.
Normal use of readline
----------------------
The _rep.ss_ library installs a readline-based function for the
prompt-and-read part of MzScheme's read-eval-print loop.
I put the following in my ~/.mzschemerc so that MzScheme always starts
with readline support:
(require (lib "rep.ss" "readline"))
The readline history is stored across invocations in MzScheme's
preferences file, assuming MzScheme exits normally.
Direct bindings for readline hackers
------------------------------------
The _readline.ss_ library provides two functions:
> (readline prompt-string) - prints the given prompt string and reads
an S-expression.
> (add-history s) - adds the given string to the readline history,
which is accessible to the user via the up-arrow key