title: Make prompt only display directory when not at $HOME?
body: <p>I'd like to prevent my terminal prompt from displaying the directory I'm in when I'm at my home directory.</p>
  
  <p>I'm using <code>zsh</code>. This is my prompt config:</p>
  
  <pre><code>PROMPT=''
  
  # Formatting
  PROMPT+='%F{8}' # dark grey
  
  # Non zero exit codes
  PROMPT+='%(?..[Exit code %?] )'
  
  # PID when relevant
  if [[ $! -ne 0 ]]; then
      PROMPT+='[PID $!] '
  fi
  
  # Current dir path
  PROMPT+='[%~] '
  
  # Formatting reset
  PROMPT+='%f' # color reset
  </code></pre>