From f4b8c0df041b063c0b47d2ec6c818a9c202fd833 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 15 Apr 2020 09:54:10 -0700 Subject: Re-namespacing Moving away from the DNS-driven namespacing toward more condensed names, mostly because I don't like typing so much. --- Com/Simatime/Shell.scm | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 Com/Simatime/Shell.scm (limited to 'Com/Simatime/Shell.scm') diff --git a/Com/Simatime/Shell.scm b/Com/Simatime/Shell.scm deleted file mode 100644 index b99e5cd..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)) -- cgit v1.2.3