|
|
@ -4,12 +4,27 @@
|
|
|
|
(gnu-history-install-file-manager (string-append (or (getenv "HOME") ".") "/.csi.history"))
|
|
|
|
(gnu-history-install-file-manager (string-append (or (getenv "HOME") ".") "/.csi.history"))
|
|
|
|
(repl-prompt (lambda () "$ "))
|
|
|
|
(repl-prompt (lambda () "$ "))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define config-file (make-parameter (string-append (or (getenv "HOME") ".") "/.hintz-shellrc")))
|
|
|
|
|
|
|
|
(when (file-exists? (config-file))
|
|
|
|
|
|
|
|
(load (config-file)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define exit? (make-parameter #f))
|
|
|
|
|
|
|
|
(define (exit) (exit? #t))
|
|
|
|
|
|
|
|
|
|
|
|
(define (shell-repl)
|
|
|
|
(define (shell-repl)
|
|
|
|
(let ((x (read)))
|
|
|
|
(if (exit?)
|
|
|
|
(if (eq? x 'exit)
|
|
|
|
|
|
|
|
#t
|
|
|
|
#t
|
|
|
|
(begin (execute (list x))
|
|
|
|
(let ((x (read)))
|
|
|
|
(newline)
|
|
|
|
(begin (handle-exceptions
|
|
|
|
(shell-repl)))))
|
|
|
|
exn
|
|
|
|
|
|
|
|
(handle-exceptions
|
|
|
|
|
|
|
|
exn
|
|
|
|
|
|
|
|
(begin (print-error-message exn)
|
|
|
|
|
|
|
|
(display (with-output-to-string (lambda () (print-call-chain)))))
|
|
|
|
|
|
|
|
(execute (list x)))
|
|
|
|
|
|
|
|
(display (eval x))
|
|
|
|
|
|
|
|
(newline))
|
|
|
|
|
|
|
|
(newline)
|
|
|
|
|
|
|
|
(shell-repl)))))
|
|
|
|
|
|
|
|
|
|
|
|
(shell-repl)
|
|
|
|
(shell-repl)
|