title: psql displaying ansi colored text
body: <p>My <code>.psqlrc</code> has following options</p>
  
  <pre><code>\setenv LESS '-iMSx4 -FXR'
  \setenv PAGER 'less'
  \pset pager always
  </code></pre>
  
  <p>and psql output which I want to be colored is</p>
  
  <pre><code> {                                                                    +
      \x1B[35m"\x1B[0m\x1B[35mr\x1B[0m\x1B[35m"\x1B[0m: [               +
         \x1B[1m\x1B[92m"\x1B[0m\x1B[32m1\x1B[0m\x1B[1m\x1B[92m"\x1B[0m,+
         \x1B[1m\x1B[92m"\x1B[0m\x1B[32m2\x1B[0m\x1B[1m\x1B[92m"\x1B[0m,+
         \x1B[1m\x1B[92m"\x1B[0m\x1B[32m3\x1B[0m\x1B[1m\x1B[92m"\x1B[0m,+
         \x1B[1m\x1B[92m"\x1B[0m\x1B[32m4\x1B[0m\x1B[1m\x1B[92m"\x1B[0m,+
         \x1B[1m\x1B[92m"\x1B[0m\x1B[32m5\x1B[0m\x1B[1m\x1B[92m"\x1B[0m,+
         \x1B[1m\x1B[92m"\x1B[0m\x1B[32m6\x1B[0m\x1B[1m\x1B[92m"\x1B[0m,+
         \x1B[1m\x1B[92m"\x1B[0m\x1B[32m7\x1B[0m\x1B[1m\x1B[92m"\x1B[0m,+
         \x1B[1m\x1B[92m"\x1B[0m\x1B[32m8\x1B[0m\x1B[1m\x1B[92m"\x1B[0m +
      ]                                                                 +
   }
  </code></pre>
  
  <p>Is there a way to make pager aware of <code>\x1B</code> ansi sequences, or to tell <code>psql</code> not to convert them to hexadecimal representations when displaying?</p>
  
  <p>Output should look like,</p>
  
  <p><a href="https://i.stack.imgur.com/iKBoM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iKBoM.png" alt="enter image description here"></a></p>