[IPython-dev] Another filename completion defect on win32 - parens

Ville Vainio vivainio at kolumbus.fi
Mon Jul 19 14:43:00 CDT 2004


It sucks to be the bearer of bad win32 news again ;-).

In the latest release candidate, completion of spaces works ok. 
Completion of parens, OTOH, doesn't.

@ursa[tmp]|261> mkdir "(123)foobar"
@ursa[tmp]|262> ls
(123)foobar\  (hi)ho\
@ursa[tmp]|263> cd (123)foobar\
------------------------------------------------------------
   File "<console>", line 1
     cd (123)foobar\
                  ^
SyntaxError: invalid syntax

@ursa[tmp]|264> mkdir foobar
@ursa[tmp]|265> cd foobar/

Note how the suggested completion for (123)foobar ends with the dreaded 
backslash. That should be forward slash, which works ok for plain 
"foobar" without parens, as can be seen from the example. cd'ing to the 
directory works with backslashes, and doesn't work without:

@ursa[tmp]|272> cd (123)foobar
------------------------------------------------------------
   File "<console>", line 1
     cd (123)foobar
                  ^
SyntaxError: invalid syntax

@ursa[tmp]|273> cd \(123\)foobar
@ursa[(123)foobar]|274>

It works with quotes too: cd "(123)foobar" is ok.

Typing "cd \(12" and pressing tabs results in a horror of chtulhuan 
proportions:

cd \(/(123/

Interestingly, the following (quotes do not start the file name) works 
without a hitch:

@ursa[tmp]|281> mkdir barbar(123)
@ursa[tmp]|282> cd barbar(123)/
@ursa[barbar(123)]|283>

The completion esacping hack that was done to spaces should probably be 
done to parens too.




More information about the IPython-dev mailing list