From 2e06c9a62f8fa97f1f84c573c3b4f84e605629ad Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Tue, 18 Jun 2013 21:10:32 +0200 Subject: Support unquote-splicing through a variant of exec-path (reported by Moritz) --- scsh-process.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scsh-process.scm') 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 +) -- cgit v1.2.3