From e6ad8129cc854dac38940acb24e3a07cd0cd7b56 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Wed, 13 May 2020 13:32:14 -0700 Subject: Re-namespace general scheme code to bs --- Alpha/Shell.scm | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 Alpha/Shell.scm (limited to 'Alpha/Shell.scm') diff --git a/Alpha/Shell.scm b/Alpha/Shell.scm deleted file mode 100644 index b00b174..0000000 --- a/Alpha/Shell.scm +++ /dev/null @@ -1,32 +0,0 @@ -(define-module (Alpha 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 getcwd) - -(define (ls) - (ftw/scandir (getcwd))) - -(define (cd path) - (chdir path) - (ls)) -- cgit v1.2.3