Almost every psql query comes out an illegible mess if not preceded by display configuration commands such as \\x auto. Typing this manually for each psql instance
\\x auto
It should also be noted that the psql command line option -x or --expanded is the same as using \x from within.
psql
-x
--expanded
\x
-P expanded=auto --pset expanded=auto -x --expanded