Ale*_*Max 9 mac terminal.app gnu-screen
我在使用 screen 和 Terminal.app 时遇到问题。如果我在屏幕底部收到一个 bash 提示并且我继续输入直到该行换行到下一行,我会看到下一行,但我没有看到此行上方的行发生变化。
这是说明我的问题的直观方式。的| 代表终端的右手边。
前。我的光标在第三个“示例”之后,我将要第四次输入“示例”:
$ asdf |
bash: asdf: command not found |
$ example example example |
Run Code Online (Sandbox Code Playgroud)
后。请注意,在换行后,屏幕没有滚动,而是“吃掉”了我所在的行并重新开始:
$ asdf |
bash: asdf: command not found |
ple |
Run Code Online (Sandbox Code Playgroud)
我所期望的(以及不使用屏幕会发生什么)是整个屏幕在换行后向下滚动一个。
bash: asdf: command not found |
$ example example example exam|
ple |
Run Code Online (Sandbox Code Playgroud)
最后,如果我将换行上的光标移动到命令行的开头会发生这种情况,它会吃掉上一行:
$ asdf |
$ example example example exam|
ple |
Run Code Online (Sandbox Code Playgroud)
知道发生了什么吗?
小智 8
成功!我从这里尝试了建议:
https://serverfault.com/questions/272818/screen-not-dropping-down-a-line
这是添加:
termcapinfo xterm* ti@:te@
Run Code Online (Sandbox Code Playgroud)
到您的.screenrc并重新启动屏幕。除了修复 OP 的问题之外,这将屏幕的回滚行为更改为对于我的平均用例可能更好的东西(例如,只要我留在同一窗口中,我就可以使用终端的回滚)。
另外,我可以在 10.7 的 Terminal.app 中确认问题。
它可能是 readline 的“水平滚动模式”。运行以下命令:
bind 'set horizontal-scroll-mode off'
Run Code Online (Sandbox Code Playgroud)
看看你的症状是否有变化。如果是这样,你可以在 ~/.inputrc 中设置