diff --git a/gash/built-ins.scm b/gash/built-ins.scm index 001b4c0..ab37cd5 100644 --- a/gash/built-ins.scm +++ b/gash/built-ins.scm @@ -17,7 +17,6 @@ ;;; along with Gash. If not, see . (define-module (gash built-ins) - #:use-module (gash built-ins echo) #:export (search-built-ins search-special-built-ins)) @@ -72,7 +71,7 @@ ("unalias" . ,undefined) ("wait" . ,undefined) ;; Other built-ins. - ("echo" . ,echo))) + ("echo" . ,(@@ (gash built-ins echo) main)))) (define (search-special-built-ins name) (assoc-ref *special-built-ins* name)) diff --git a/gash/built-ins/echo.scm b/gash/built-ins/echo.scm index 2a5d6da..de94fde 100644 --- a/gash/built-ins/echo.scm +++ b/gash/built-ins/echo.scm @@ -20,8 +20,7 @@ (define-module (gash built-ins echo) #:use-module (ice-9 match) #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:export (echo)) + #:use-module (srfi srfi-26)) ;;; Commentary: ;;; @@ -57,7 +56,7 @@ (char=? (string-ref str 0) #\-) (string-every (cut member <> '(#\E #\e #\n)) (substring str 1)))) -(define (echo . args) +(define (main . args) (let* ((options (append-map (compose cdr string->list) (take-while option? args))) (args (drop-while option? args))