diff options
author | Ben Sima <ben@bsima.me> | 2020-05-13 13:32:14 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-05-13 13:32:14 -0700 |
commit | e6ad8129cc854dac38940acb24e3a07cd0cd7b56 (patch) | |
tree | dfadd90e9039184e3d1415cdcddfcd39108e9d5c /Alpha/Shell.scm | |
parent | 5fc1cc6602ac03d05ce004d8d4d9c712242f318b (diff) |
Re-namespace general scheme code to bs
Diffstat (limited to 'Alpha/Shell.scm')
-rw-r--r-- | Alpha/Shell.scm | 32 |
1 files changed, 0 insertions, 32 deletions
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)) |