summaryrefslogtreecommitdiff
path: root/scsh-process.scm
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2013-06-18 21:10:32 +0200
committerPeter Bex <peter@more-magic.net>2013-06-18 21:10:32 +0200
commit2e06c9a62f8fa97f1f84c573c3b4f84e605629ad (patch)
tree94e64bd763607b198e476e4d5a47ae02c05e7e6c /scsh-process.scm
parent33317e50521f6ccf2575b63ff18098d08ad84548 (diff)
downloadscsh-process-2e06c9a62f8fa97f1f84c573c3b4f84e605629ad.tar.gz
Support unquote-splicing through a variant of exec-path (reported by Moritz)
Diffstat (limited to 'scsh-process.scm')
-rw-r--r--scsh-process.scm10
1 files changed, 7 insertions, 3 deletions
diff --git a/scsh-process.scm b/scsh-process.scm
index e53cbf3..08f5d77 100644
--- a/scsh-process.scm
+++ b/scsh-process.scm
@@ -39,7 +39,7 @@
(module scsh-process
(;; procedures
- exec-path fork %fork fork/pipe %fork/pipe fork/pipe+ %fork/pipe+
+ exec-path exec-path* fork %fork fork/pipe %fork/pipe fork/pipe+ %fork/pipe+
run/collecting* run/string* run/strings* run/port* run/file* run/sexp* run/sexps*
;; macros
@@ -152,6 +152,10 @@
;; execve can be used in a sensible way? Scsh has its own PATH, so we could
;; use something similar to that, but it's more work.
(define (exec-path prog . args)
+ (exec-path* prog args))
+
+;; Internal variant, collecting args
+(define (exec-path* prog args)
(process-execute (maybe->string prog) (map maybe->string args)))
(define (fork/pipe #!optional thunk continue-threads?)
@@ -383,6 +387,6 @@
((_ (?prog ?arg0 ...) ?redir0 ...)
(begin
(setup-redirection ?redir0) ...
- (exec-path `?prog `?arg0 ...)))))
+ (exec-path* `?prog `(?arg0 ...))))))
-) \ No newline at end of file
+)