diff --git a/gash/shell.scm b/gash/shell.scm index 2bf724c..dc77884 100644 --- a/gash/shell.scm +++ b/gash/shell.scm @@ -179,9 +179,12 @@ parameter to be updated, the port that should be its new value (or @code{#f} if it should be considered closed), and a boolean indicating if it is our responsibility to close the port." + ;; On Mes, 'port?' does not really work. Hence, if TARGET is a + ;; port, it will be wrapped in a list. This means that the 'pair?' + ;; case below is actaully checking for a port. (define* (make-processed-redir fd target #:optional (open-flags 0)) (let ((port (match target - ((? port?) target) + ((? pair?) (car target)) ((? string?) (open target open-flags)) ;; TODO: Verify open-flags. ((? integer?) ((fd->current-port target))) @@ -215,7 +218,7 @@ if it is our responsibility to close the port." (let ((port (tmpfile))) (display text port) (seek port 0 SEEK_SET) - (make-processed-redir fd port))))) + (make-processed-redir fd (list port)))))) (define (sh:set-redirects redirs) "Put the redirects @var{redirs} into effect."