title: Colors in the psql prompt
body: <p>I get an trash after the prompt when I flick through the history when I add colors to my prompt.</p>
  
  <p>I have tried the proposed color prompt command from the <a href="http://www.postgresql.org/docs/9.3/interactive/app-psql.html" rel="noreferrer">postgres doc</a>:</p>
  
  <pre><code>\set PROMPT1 '%[%033[1;33;40m%]%n@%/%R%[%033[0m%]%# '
  </code></pre>
  
  <p>I have also tried a lot of other prompt examples that i found with google but with the same result.</p>
  
  <p>So after setting the prompt I have a yellow prompt something like this:</p>
  
  <pre><code>ulf@mydb=#
  </code></pre>
  
  <p>I then run the query:</p>
  
  <pre><code>ulf@mydb=# select * from country;
  </code></pre>
  
  <p>Then I flick through the history with <kbd>↑</kbd><kbd>↑</kbd><kbd>↓</kbd>. This would bring me the select-line ones more, but instead I get:</p>
  
  <pre><code>ulf@mydb=# \set PROMPT1 'select * from country;
  </code></pre>
  
  <p>Note the <code>\set...</code> before the <code>select</code>which is a remnant from the initial promt-setting.</p>
  
  <p>I also get similar result if I put the <code>\set PROMPT1</code>-command in <code>.pslqrc</code></p>
  
  <p>I get the same result in both xterm and gnome-terminal. I have my bash-prompt colored in a similar way but I have no problems with that prompt.</p>
  
  <p>What have I done wrong?</p>