我想要一个快捷键清除屏幕在我的(Windows 7) psql 控制台就像 CTRL-l 清除屏幕在我的 R 控制台。我厌倦了打字!课税年度。我需要为此编写宏吗?我负责 Postgres 9.35。“ r”重置查询缓冲区,但不清除屏幕。提前感谢你的帮助,如果我错过了一些简单的东西,对不起。
Please use: CTRL + L
Check out the link: http://postgresql.nabble.com/psql-in-bash-how-to-clear-screen-td2141886.html
As an alternative to Ctrl-L use, e.g. for scripts in an linux environment:
\! clear
or
\! cls
for Microsoft.
In case CTRL + L doesn't work on the Windows OS, use:
Ensure there is SPACE between \! and cls, hit ENTER.
SPACE
\!
cls
ENTER
\! cls + Enter
can be usedfor Windows 10
When using psql ((PostgreSQL) 14.4) through linux terminal just use:
CTRL + Shift + L
It will clear outputs and move cursor to the top of terminal window.
:)
This works for me using postgresql in Windows 10 with Bash:
If you're using WSL and a Docker Container, only works with:
\clear