Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用屏幕在分屏中显示不同的日志。我想在进程结束时自动取消拆分屏幕,或者至少切换到下一个活动窗口。现在,当我关闭一个程序时,屏幕保持空白,除非我手动切换到另一个窗口或缓冲区。或者,有没有办法拦截 CTRL-C 并退出屏幕?
解决方案的一个示例是使用“eval”来a)导航到拆分和b)“删除”此拆分。
两个区域相互上方的示例,位于较低区域并希望“拆分”较高区域。'sleep' 是我等待在上拆分中完成的过程:
sleep 5 && screen -X eval 'focus top' 'remove'