如何要求超级简单的标准输入?
我发现当我在 clisp 程序的标准输入中输入这样的一行时……
((74 25 80))
光标似乎在跳舞,无论我是在做
(read)
还是
(read-from-string (read-line))
在做,也就是说,当我输入每个右括号时,光标短暂悬停在匹配的左括号上。如果我提前输入,有时直到该点输入的整行都会重新回显给我。
我想这会很好,但我是通过 pty 执行此操作,并且我希望来自该 pty 的输入(在 clisp 程序的标准输出和错误输出上显示的内容)是“干净的”。没有舞动的光标,没有线条的回响。
我想我可以使用命名管道作为输入和输出,但我想通过 pty 来处理这个问题。
如何使标准输入变得纯粹?没有跳舞的光标?没有重新回显预先输入的内容?我可以只修改某处的配置文件吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来好像正在使用 GNU Readline。 clisp 有一个 -disable-readline 命令行标志根据此页面。如果做不到这一点,我认为您将不得不使用管道来说服 readline 它不是从终端读取或者它没有输出到终端。
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.