blob: 3d2f6d9c172547c84dd89794b0cd1807cc1b8bef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
(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))))
|