Respect '--parse' flag for files and non-TTY inputs.

* gash/gash.scm (main): Include 'parse?' in all calls to 'run-repl'.
This commit is contained in:
Jan Nieuwenhuizen 2018-12-31 20:03:12 +01:00 committed by Timothy Sample
parent 13f43973f5
commit 6808c941f1
1 changed files with 2 additions and 2 deletions

View File

@ -144,7 +144,7 @@ copyleft.
(set-program-arguments files)
(call-with-input-file script
(lambda (port)
(exit (run-repl port))))))
(exit (run-repl port parse?))))))
((isatty? (current-input-port))
(let* ((HOME (string-append (getenv "HOME") "/.gash_history"))
(thunk (lambda ()
@ -166,7 +166,7 @@ copyleft.
(with-readline-completion-function completion thunk)
(write-history HOME)
(newline)))
(else (exit (run-repl))))))))
(else (exit (run-repl (current-input-port) parse?))))))))
(thunk)))
(define prompt