Next: , Previous: , Up: iklib   [Index]


6.50 Readline interface

The following bindings are exported by the library (vicare). An extended API for GNU Readline is available through the (vicare readline) library; (vicare-libs)Extended interface to GNU Readline for details.

Function: readline-enabled?

Return #t is support for readline is enabled, return #f otherwise. When this function returns #f: no other readline functions must be called, lest the process be aborted.

Function: readline
Function: readline prompt

Read a single line and return it as a Scheme string not terminated by a newline character. prompt must be #f, a bytevector or a string to be used as input prompt; when #f or not present: no prompt will be displayed.

Function: make-readline-input-port
Function: make-readline-input-port prompt-maker

Return a custom textual input port reading character through readline.

prompt-maker must be a #f or a thunk, when not used it defaults to #f; the thunk, when evaluated, must return a string or bytevector representing the input prompt in ASCII characters; if the return value is #f or prompt-maker is not used: no prompt will be displayed.