title: Custom PS1 prompt in .kshrc not working
body: <p>I have to work with a NFS user id between two hosts: A running Ksh 93 and B running pdksh 88.</p>
  
  <p>My problem has to do with the custom prompt I created on A: it works like a charm and display colors:</p>
  
  <pre><code>PS1="$'\E[46;31m'`logname`@$'\E[1;33m'`hostname -s`:$'\E[0m&gt;"
  </code></pre>
  
  <p>But I switch over to B, it all goes to hell (private info removed). The prompt fails to display colors like host A ; instead, the color codes are displayed "in clear".</p>
  
  <pre><code>$'\E[46;31m'NFS_user_name@$'\E[1;33m'host_name_for_B:$'\E[0m&gt;
  </code></pre>
  
  <p>The prompt on host B is not displaying colors like host A so I want B to display a basic prompt instead. To get around the problem, I edited my <code>.kshrc</code> file to add this code at the end:</p>
  
  <pre><code>export NODE=`uname -n`
  
  case $NODE in
      host_name_for_B)
          PS1="[`logname`@`uname -n`]&gt;"
          ;;
      *)
          PS1="$'\E[46;31m'`logname`@$'\E[1;33m'`hostname -s`:$'\E[0m&gt;"
          ;;
  esac
  </code></pre>
  
  <p>The case statement does not work: PS1 does not switch to</p>
  
  <pre><code>PS1="[`logname`@`uname -n`]&gt;"
  </code></pre>
  
  <p>for host B. </p>
  
  <p>Any idea what could be the problem?</p>