Search code examples
lispcommon-lispclisp

How does one ask for super-plain vanilla standard input?


I find when I'm typing a line like this to a clisp program's standard input ...

((74 25 80))

... the cursor seems to dance, and it doesn't matter whether I'm doing

(read)

or

(read-from-string (read-line))

That is, when I type each right parenthesis, the cursor briefly hovers over the matching left parenthesis. If I type ahead, sometimes the whole line typed up to that point is re-echoed back to me.

This would be fine, I guess, but I'm doing this over a pty, and I want the input from that pty (what shows up on the clisp program's standard output and error output) to be "clean". No dancing cursor, no re-echoing of the line.

I suppose I could use named pipes for the input and output, but I want to handle this through the pty.

How do I make standard input be purely vanilla? No dancing cursor? No re-echoing of typeahead? Can I just modify a configuration file somewhere?


Solution

  • Sounds like GNU Readline is being used. There's a -disable-readline command line flag for clisp according to this page. Failing that, I think you're going to have to use a pipe to either convince readline that it isn't reading from a terminal or that it isn't outputting to a terminal.