commit 3ae93e1
chld
·
2026-08-15 04:49:45 +0000 UTC
parent 3be3aa9
diddy
M
cmd.scm
+8,
-4
1@@ -1,8 +1,12 @@
2 ;; (open-input-pipe (format #t "echo ~a" (cadr (command-line))))
3-(define-module (cmd))
4-(use-modules (ice-9 popen)
5- (ice-9 rdelim))
6+(define-module (cmd)
7+ #:use-module (ice-9 popen)
8+ #:use-module (ice-9 rdelim)
9+ #:export (System Warn)
10+)
11
12-(define (system . a)
13+(define (System . a)
14 (let ((p (apply open-pipe* OPEN_READ a)))
15 (display (read-string p))(close-pipe p)))
16+(define (Warn a)
17+ (format #t "\x1b[m\x1b[33mwarning: ~a" a)(newline))
A
test.scm
+5,
-0
1@@ -0,0 +1,5 @@
2+(use-modules (cmd)
3+ )
4+
5+(Warn "this will be some sort of libdmake.sh helper in guile")
6+(System "ls" "/")