summaryrefslogtreecommitdiff
path: root/com/simatime/shell.scm
diff options
context:
space:
mode:
Diffstat (limited to 'com/simatime/shell.scm')
-rw-r--r--com/simatime/shell.scm34
1 files changed, 0 insertions, 34 deletions
diff --git a/com/simatime/shell.scm b/com/simatime/shell.scm
deleted file mode 100644
index 7c6bb5c..0000000
--- a/com/simatime/shell.scm
+++ /dev/null
@@ -1,34 +0,0 @@
-(define-module (com simatime shell)
- #:use-module ((ice-9 popen) #:prefix popen/)
- #:use-module ((ice-9 rdelim) #:prefix rdelim/)
- #:use-module ((ice-9 ftw) #:prefix ftw/)
- #:export (exec
- stream
- pwd
- ls
- cd))
-
-(define (exec cmd)
- (let* ((port (popen/open-input-pipe cmd))
- (ret (read port)))
- (popen/close-pipe port)
- ret))
-
-(define (stream cmd)
- (let* ((port (popen/open-input-pipe cmd))
- (_ (setvbuf port 'none))
- (ret (rdelim/read-string port)))
- (flush-all-ports)
- (popen/close-pipe port)
- ret))
-
-(define (pwd)
- (regexp-substitute/global
- #f "/home/ben" (getcwd) 'pre "~" 'post))
-
-(define (ls)
- (ftw/scandir (getcwd)))
-
-(define (cd path)
- (chdir path)
- (ls))