title: PS1 command substitution fails when containing newlines on msys bash
body: <p>This command succeeds</p>
  
  <pre>
  $ PS1='$(date +%s) $ '
  1391380852 $
  </pre>
  
  <p>However if I add a newline it fails</p>
  
  <pre>
  $ PS1='$(date +%s)\n$ '
  bash: command substitution: line 1: syntax error near unexpected token `)'
  bash: command substitution: line 1: `date +%s)'
  </pre>
  
  <p>If I use backticks it works</p>
  
  <pre>
  $ PS1='`date +%s`\n$ '
  1391381008
  $
  </pre>
  
  <p>but <a href="http://mywiki.wooledge.org/BashFAQ/082">backticks are discouraged</a>. So what is causing this error?</p>
  
  <pre>
  GNU bash, version 4.2.45(6)-release
  </pre>