tab completion does not escape ()

Bug #258721 reported by Peter Bienstman
2
Affects Status Importance Assigned to Milestone
IPython
Fix Committed
Low
Ville M. Vainio

Bug Description

I have a file coming from a Windows user called aaaa(1).txt, tab completion under linux expands this to

aaaa(1).txt

as opposed to

aaaa\(1\).txt

as is done by bash.

Revision history for this message
Ville M. Vainio (villemvainio) wrote :

If this is changed, it should be limited to Linux.

Changed in ipython:
assignee: nobody → villemvainio
Revision history for this message
Peter Bienstman (peter-bienstman) wrote :

BTW, another character where this problem occurs is the apostrophe.

Revision history for this message
Ville M. Vainio (villemvainio) wrote :

I fixed it for () characters. I'll add " ' after 0.9, it's really too late to play with these too much at this point in release cycle.

Changed in ipython:
importance: Undecided → Low
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
Batz (batman900+launchpad) wrote :

Small patch for the other special bash characters.

diff --git a/IPython/core/completer.py b/IPython/core/completer.py
index b4b83e1..90c12af 100644
--- a/IPython/core/completer.py
+++ b/IPython/core/completer.py
@@ -95,7 +95,7 @@ __all__ = ['Completer','IPCompleter']
 if sys.platform == 'win32':
     PROTECTABLES = ' '
 else:
- PROTECTABLES = ' ()'
+ PROTECTABLES = ' ()[]{}?=\\|;:\'#*"^&'

 #-----------------------------------------------------------------------------
 # Main functions and classes

Revision history for this message
Fernando Perez (fdo.perez) wrote :
Changed in ipython:
status: In Progress → Fix Committed
Revision history for this message
Fernando Perez (fdo.perez) wrote :

Note that no further updates will be posted here, if anything else needs further work on this bug, please see the new bug tracker on github using the link above.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.