Don't try to expand/glob parts of the command line that are

s-expressions
This commit is contained in:
eknauel 2005-08-10 18:29:04 +00:00
parent 1c20604f4f
commit 3b6c77f553
1 changed files with 7 additions and 5 deletions

View File

@ -55,18 +55,20 @@
=> lookup-env-var)
(else str)))
(define (expand-string str)
(substitute-env-vars str))
(define (expand-string/s-expr v)
(if (string? v)
(substitute-env-vars v)
v))
(define (expand-redirection redirection)
(make-redirection
(redirection-op redirection)
(expand-string (redirection-dest redirection))))
(expand-string/s-expr (redirection-dest redirection))))
(define (expand-command command)
(let ((expanded (map expand-string (command-args command))))
(let ((expanded (map expand-string/s-expr (command-args command))))
(make-command
(expand-string (command-executable command))
(expand-string/s-expr (command-executable command))
(fold-right
(lambda (arg args)
(if (contains-glob-expression? arg)