[IPython-dev] tab completion w/ spaces in filename?

Fernando Perez Fernando.Perez at colorado.edu
Tue Jun 29 18:41:28 EDT 2004

Ville Vainio wrote:
> Fernando Perez wrote:
>>I really try to keep the number of builtin magics under control.  
>>Especially since it's so trivial to write a one-line magic in your own 
>>config file that delegates (pseudo code below):
> Ack. I'll move the code from cdb to cd.

Thanks.  I didn't mean to discourage you, I'm just trying to keep the base 
design reasonably clean.  Tweakers like you and me can always go under the hood :)

> BTW, is tab completion supposed to work for files with spaces in their 
> name? Completing a spaced file leaves the spaces as such in the file 
> name (i.e. they are not escaped, quoted or anything), so that pressing 
> tab a second time gives the list of all files, i.e. it doesn't consider 
> what is already typed/completed. Adding backslashes manually to escape 
> the spaces doesn't help.

It's broken.  I'd never noticed, since I just don't use spaces in my filenames 
ever.  It should be easy to fix by putting in the escapes in the file 
completer method.  Look towards the beginning of iplib.py.



More information about the IPython-dev mailing list