gpt4 book ai didi

scheme - 方案解释器中的向上箭头发送 ^[[A 而不是返回历史

转载 作者:行者123 更新时间:2023-12-01 12:42:18 25 4
gpt4 key购买 nike

我正在运行 mit-scheme-x86-64 并读取 SICP。

出于某种原因,向上和向下箭头的行为与它们在终端/所有其他解释器中的行为不同。

他们分别发送 ^[[A 和 ^[[B。

我尝试在我的 .bashrc 中这样做,但没有成功。

bind '"^[[A":history-search-backward'
bind '"^[[B":history-search-forward'

我实际上不太确定我应该做什么。

最佳答案

尝试使用rlwrap出于这些目的:

rlwrap runs the specified command, intercepting user input in order to provide readline’s line editing, persistent history and completion.

rlwrap tries to be completely transparent − you (or your shell) shouldn’t notice any difference between command and rlwrap command − except the added readline functionality, of course. This should even hold true when you are re−directing, piping and sending signals from and to command, or when command manipulates its terminal settings.

There are many options to add (programmable) completion, handle multi−line input, colour and re−write prompts. If you don’t need them (and you probably don’t), you can skip the rest of this manpage.

关于scheme - 方案解释器中的向上箭头发送 ^[[A 而不是返回历史,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23238749/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com