title: How can this PS1 variable be defined in single-quotes?
body: <p>The default <code>.bashrc</code> file for Debian-based systems sets <code>$PS1</code> like this:</p>
  
  <pre><code>PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  </code></pre>
  
  <p>What confuses me is that <code>${debian_chroot}</code> part. According to <a href="https://stackoverflow.com/q/6697753/617937"><em>StackOverflow: Difference between single and double quotes in bash</em></a>, if single-quotes are used when defining a string, characters such as <code>$</code> should be treated as a literal, rather than evaluate variables.</p>
  
  <p>Doesn't this mean that Bash should <em>actually</em> print out <code>${debian_chroot:...</code>, and not the value of that variable? Or are there more syntax rules involved here?</p>