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:
parent
13f43973f5
commit
6808c941f1
|
@ -144,7 +144,7 @@ copyleft.
|
||||||
(set-program-arguments files)
|
(set-program-arguments files)
|
||||||
(call-with-input-file script
|
(call-with-input-file script
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(exit (run-repl port))))))
|
(exit (run-repl port parse?))))))
|
||||||
((isatty? (current-input-port))
|
((isatty? (current-input-port))
|
||||||
(let* ((HOME (string-append (getenv "HOME") "/.gash_history"))
|
(let* ((HOME (string-append (getenv "HOME") "/.gash_history"))
|
||||||
(thunk (lambda ()
|
(thunk (lambda ()
|
||||||
|
@ -166,7 +166,7 @@ copyleft.
|
||||||
(with-readline-completion-function completion thunk)
|
(with-readline-completion-function completion thunk)
|
||||||
(write-history HOME)
|
(write-history HOME)
|
||||||
(newline)))
|
(newline)))
|
||||||
(else (exit (run-repl))))))))
|
(else (exit (run-repl (current-input-port) parse?))))))))
|
||||||
(thunk)))
|
(thunk)))
|
||||||
|
|
||||||
(define prompt
|
(define prompt
|
||||||
|
|
Loading…
Reference in New Issue