防止清除 bash ubuntu-16.04 中以前的屏幕

Prevent clear from clearing previous screens in bash ubuntu-16.04

我正在尝试确定一种方法来阻止清除在 ubuntu-16.04

上清除以前的终端命令历史记录

我希望它有类似的行为 Ctrl+L,但我已经养成了键入 clear 的习惯(因为在我升级之前它在我的 Ubuntu-14.04 上有这种行为)。

有什么简单的方法可以做到这一点吗?

我最初的想法是为不同的命令设置别名 clear,但我不确定这个命令会是什么样子。
任何人都可以协助解决这个问题,还是我只需要习惯使用 Ctrl+L?

男人清楚:

clears your screen if this is possible, including its scrollback
buffer (if the extended "E3" capability is defined).

要了解是否已定义此扩展 "E3" 以及如何更改此行为,这可能对您有用:https://superuser.com/questions/1094599/how-do-i-change-the-behavior-of-clear-on-centos7-such-that-it-will-not-clear