To complement this, I recommend installing `pgcli`[https://www.pgcli.com/]. It's a near-drop-in-replacement for psql, and gives autocompletion, syntax highlighting, and semicolon forgiveness.
Even as someone already comfortable with psql, pgcli is extremely handy.
pgcli is nice
and it works great with pspg pager [https://github.com/okbob/pspg]
''\pager /usr/local/bin/pspg''