title: How to custom display prompt in KornShell to show hostname and current directory?
body: <p>I am using KornShell (ksh) on Solaris and currently my PS1 env var is:</p>
  
  <p><code>PS1="${HOSTNAME}:\${PWD} \$ "</code></p>
  
  <p>And the prompt displays: <code>hostname:/full/path/to/current/directory $</code></p>
  
  <p>However, I would like it to display: <code>hostname:directory $</code></p>
  
  <p>In other words, how can I display just the hostname and the name of the current directory, i.e. <code>tmp</code> or <code>~</code> or <code>public_html</code> etc etc?</p>