better conditions for usage

svn: r5245
This commit is contained in:
Eli Barzilay 2007-01-07 19:13:10 +00:00
parent 28c8966c85
commit 1e1ae2714a

View File

@ -11,16 +11,21 @@ The _rep.ss_ library installs a readline-based input port, and hooks
the prompt-and-read part of MzScheme's read-eval-print loop to the prompt-and-read part of MzScheme's read-eval-print loop to
interact with it. interact with it.
You can put the following in your ~/.mzschemerc so that MzScheme You can start MzScheme with
starts with readline support on xterms:
(when (regexp-match? #rx"xterm" (getenv "TERM"))
(dynamic-require '(lib "rep.ss" "readline") #f))
or start MzScheme with
mzscheme -L rep.ss readline mzscheme -L rep.ss readline
or you can put the following in your ~/.mzschemerc so that MzScheme
starts with readline support when appropriate:
(when (and (regexp-match? #rx"xterm" (getenv "TERM"))
(terminal-port? (current-input-port)))
(dynamic-require '(lib "rep.ss" "readline") #f))
(The first condition rules out running in dumb terminals, eg, inside
Emacs, and the second condition avoids using it when input is
redirected.)
The readline history is stored across invocations in MzScheme's The readline history is stored across invocations in MzScheme's
preferences file, assuming MzScheme exits normally. preferences file, assuming MzScheme exits normally.