(define-module (com simatime repl) #:use-module ((ice-9 ftw) #:prefix ftw:) #:export (pr prn pwd ls cd)) ;; ;; shell-like stuff ;; (use-modules ((ice-9 ftw) #:prefix ftw:)) (define (pwd) (regexp-substitute/global #f "/home/ben" (getcwd) 'pre "~" 'post)) (define (ls) (ftw:scandir (getcwd))) (define (cd path) (chdir path) (ls)) ;; ;; repl customization ;; ;; (use-modules (system repl common)) ;; (repl-default-option-set! ;; 'prompt ;; (lambda (repl) ;; (format #f "\n[~a@~a:~a]\nλ> " ;; (getenv "USER") ;; (vector-ref (uname) 1) ;; (pwd))))