title: Bash if [ -d $1] returning true for empty $1
body: <p>So I have the following little script and keep wondering..</p>
  
  <pre><code>#!/bin/bash
  
  if [ -d $1 ]; then
    echo 'foo'
  else
    echo 'bar'
  fi
  </code></pre>
  
  <p>.. why does this print foo when called <em>without arguments</em>? How is it that the test [-d ] returns true for an empty string?</p>