Make (shell) in (chibi shell) return exit status of last command.

This commit is contained in:
Lockywolf 2022-08-24 13:17:37 +08:00
parent f367cb86e2
commit 6bb62979fd

View file

@ -494,10 +494,11 @@
(lambda () #f) (lambda () #f)
(lambda () #f))))) (lambda () #f)))))
;;> Returns the exit status of the last command in the pipeline.
(define-syntax shell (define-syntax shell
(syntax-rules () (syntax-rules ()
((shell cmd ...) ((shell cmd ...)
(for-each shell-wait (shell& cmd ...))))) (map shell-wait (shell& cmd ...)))))
(define-syntax shell->string (define-syntax shell->string
(syntax-rules () (syntax-rules ()