I want a shortcut key to clear the screen in my (Windows 7) psql console just like CTRL-l clears the screen in my R console. I am tired of typing '! cls'. Do I need to write a macro for this? I am running Postgres 9.35. '\r' resets the query buffer but does not clear the screen. Thanks in advance for your help, sorry if I have just missed something simple.
Use \! cls to clear screen.
The Clear command clears the screen of the SQL*Plus application window and the screen buffer. Shift+Del is the keyboard shortcut for the Clear command.
The meta-command for exiting psql is \q .
As an alternative to Ctrl-L use, e.g. for scripts in an linux environment:
\! clear
or
\! cls
for Microsoft.
Please use: CTRL + L
Check out the link: http://postgresql.nabble.com/psql-in-bash-how-to-clear-screen-td2141886.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With