Get interactive psql shell after executing queries I want to execute a set of commands before executing other queries using psql

The following is what I want to execute

psql &lt;&lt; EOF
\setenv PAGER 'pspg -s 0'
\pset pager always
EOF


After executing this, I want to have an interactive shell with these parameters set.

I am looking for how to get interactive shell after this.
psql has a built-in feature to set defaults: the ~/.psqlrc file. 

You can put any command in there that should be executed when you start psql

So just create that file and put:

\setenv PAGER 'pspg -s 0'
\pset pager always


into it.