title: Reading and tab-completing a directory name in a bash script
body: <p>I want to prompt the user for a directory name, and have them able to tab-complete to a valid directory.</p>
  
  <p>So far, I've got tab-completion working for both files and directories using "read -e". I only want directories to be autocompleted when the user presses tab.</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>echo "Enter a directory"
  read -e -p "&gt; " DEST
  </code></pre>
  
  <p>How can I make bash only return a list of directories when the user presses tab, rather than a list of files <strong>and</strong> directories?</p>