title: IPython doesn't tab-complete filenames in sub-dirs after %run
body: <h1>Intro</h1>
  
  <p>I can't get IPython to tab-complete filenames in sub-directories after using the %run magic function. However, completion for files in the current dir works just fine. Also, completion works perfectly if any other magic function is used.</p>
  
  <h1>Cases</h1>
  
  <p>If I do <code>run ./rename-parameters.py -x ../</code> then hit <code>&lt;TAB&gt;</code>, only directories are shown:</p>
  
  <pre><code>In [32]: run rename-parameters.py -x ../
  ../01_Projektplanung/  ../04_Infos/           ../07_Test/
  ../02_ToDo/            ../05_Software/        ../08_Tools/
  ../03_Anforderungen/   ../06_Hardware/        ../09_Dokumente/
  </code></pre>
  
  <p><br/></p>
  
  <p>If I try to tab complete filenames in the current directory, e.g. <code>run rename-parameters.py -x R_Paramete</code> then hit <code>&lt;TAB&gt;</code>,
  it completes fine.</p>
  
  <p><br/>
  Strangely, if I try <code>run rename-parameters.py -x ./R_Paramete</code> &lt;\TAB> (notice the"./") it does <b>not</b> complete the filename.</p>
  
  <p><br/>
  If I use any other magic function regular files show up fine: </p>
  
  <pre><code>In [32]: %debug rename-parameters.py -x ../
  ../01_Projektplanung/       ../05_Software/             ../09_Dokumente/            ../diag_layerb0\ -\ Copy.c
  ../02_ToDo/                 ../06_Hardware/             ../Thumbs.db                ../diag_layerb0\ -\ Copy.h
  ../03_Anforderungen/        ../07_Test/                 ../diag_layerb0.c
  ../04_Infos/                ../08_Tools/                ../diag_layerb0.h
  enter code here
  </code></pre>
  
  <p><br/>
  <br/>
  Any and all ideas are appreciated.</p>
  
  <p>PS: The only workaround I found was <a href="https://stackoverflow.com/a/14409510/797744">this</a>, but it's inconvenient.</p>