GNU Screen: files to numbered buffers?

2019-07-30 11:18发布

I unefficiently use "^a + ESC SPACE -- SPACE" and "^a + ]".

1. How can I copy a big file to GNU Screen buffer like

^a + : cat big_file > new_buffer

^a + : new_buffer ]

2. How can specify the number for each buffer like

^a + : cat big_file 2> new_buffer_number_2

^a + 2]

1条回答
看我几分像从前
2楼-- · 2019-07-30 12:03

Maybe you want :readbuf?

^A :readbuf /path/to/file
^A ]

I haven't used 'buffers' in GNU Screen (never knew they existed), but I'm guessing :readreg is the buffer-y version of :readbuf:

^A :readreg x /path/to/file
^A :paste x
查看更多
登录 后发表回答