]> www.ginac.de Git - ginac.git/commit
[PATCH] Make ginsh evaluate line-by-line in non-interactive mode.
authorVitaly Magerya <vmagerya@gmail.com>
Wed, 21 Jun 2023 18:48:36 +0000 (20:48 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 21 Jun 2023 18:48:36 +0000 (20:48 +0200)
commit4bc2092e2f15a6422774c34c7f8fa4079be67d08
treea14bd2a783065efa7fee97c17b0bb70ec07327fe
parentfd1b07682fe3aceaf1658181c62a2b1272b01ba6
[PATCH] Make ginsh evaluate line-by-line in non-interactive mode.

When used interactively ginsh consumes the input line-by-line, so
if a complete expression is entered it is enough to end the line
to get an evaluated result. In the non-interative mode (i.e. if
the input is not a tty) the input is consumed in blocks, making
it impossible to use ginsh as a subprocess.

This patch makes the non-interactive mode reuse the same line
parsing logic as the interactive mode (without readline), but skips
printing the "> " prompt, preserving the backward compatibility.
ginsh/ginsh_lexer.lpp