title: Only list host in the bash prompt if running remotely?
body: <p>I'm trying to modify my Bash prompt to my will; this is how <code>$PS1</code> looks at the moment (with colors edited out for clarity):</p>
  
  <pre><code>PS1='\u@\h:\w\$ '
  </code></pre>
  
  <p>Which results in:</p>
  
  <pre><code>andreas@tablet-2710p-ubuntu:~$ 
  </code></pre>
  
  <p>Can I tweak the prompt so it hides the <code>@tablet-2710p-ubuntu</code> bit (represented by <code>@\h</code>) if I'm running the current Bash session <em>locally</em>, rather than accessing a remote server?</p>
  
  <p>I'd also rather not hard-code it (for instance, just replacing any occurrence of <code>tablet-2710p-ubuntu</code>) for portability's sake, and in case the host name is changed later.</p>