Put this into ~/.scheme.init:
(unless (nearest-cmdl/batch-mode?)
(bind-default-condition-handler
'()
(lambda (c)
(display c)
(newline)
(restart 1))))
Run this:
(load-option 'format)
(with-output-to-file "rlcommands" (lambda ()
(let loop ((bindings (environment-bindings system-global-environment)))
(when (not (null? bindings))
(format #t "~a\n" (car (car bindings)))
(loop (cdr bindings))))))
Use the output with rlwrap:
rlwrap -b '(' -f rlcommands -H rlhistory scheme
Enjoy your tab completion and silent error handling.