我一直在试图解决这个问题——目标是在 GNU Screen 中水平滚动。(为了避免 CLI mysql 查询结果中出现丑陋的换行。)
如果你这样做:
screen -h 5000 # 5000 lines history
Ctrl-a r # to disable horizontal wrap
mysql -u user -p
SELECT * FROM db.big_fat_table LIMIT 500;
Ctrl-a [ # to enter scroll (copy) mode
Run Code Online (Sandbox Code Playgroud)
现在您可以分别使用Ctrl-b
和上下滚动Ctrl-d
。但是你如何左右滚动?
我不认为关闭该wrap
选项会起到您认为的作用。这是我的手册页显示的选项wrap
:
\n\n\nRun Code Online (Sandbox Code Playgroud)\nwrap [on|off]\n\nSets the line-wrap setting for the current window. When line-wrap is\non, the second consecutive printable character output at the last col-\numn of a line will wrap to the start of the following line. As an\nadded feature, backspace (^H) will also wrap through the left margin to\nthe previous line. Default is \xe2\x80\x98on\xe2\x80\x99.\n
这是一个低级终端功能,与水平滚动无关。
\n\n但是,less
有一个功能可能会对您有所帮助,该-S
开关允许您使用左右箭头键在文件中左右滚动。如果您正在查看包含长行的结果文件,这可能非常有用。
归档时间: |
|
查看次数: |
3014 次 |
最近记录: |