title: Different directory for bash_completion (auto-complete subfolders under specified directory)
body: <p>To be able to enter <code>dev my-[tab]</code> anywhere on my system and receive auto completion like </p>
  
  <pre><code>$ dev my-[tab]
  my-project
  my-awesome-project
  </code></pre>
  
  <p>I created a file in <code>/etc/bash_completion.d/</code> with the following content:</p>
  
  <pre><code>_dev()
  {
      PROJECTS=$(ls /development)
      local cur=${COMP_WORDS[COMP_CWORD]}
  
      COMPREPLY=( $(compgen -W "${PROJECTS}" -- $cur) )
  }
  
  complete -F _dev dev
  </code></pre>
  
  <p>This works just fine, but I would also like to be able to auto-complete subfolders:</p>
  
  <pre><code>[~] $ dev my-p[tab]
  [~] $ dev my-project/[tab][tab]
  src    doc
  [~] $ dev my-project/s[tab][enter]
  [/development/my-project/src] $
  </code></pre>
  
  <p>So basically, I would like to have auto-completion for <code>dev</code> the same way it is for <code>cd</code>.</p>
  
  <p><code>dev</code> is only an alias:</p>
  
  <pre><code>alias dev='gotodev'
  gotodev ()
  { 
      cd /development/$1
  }
  </code></pre>