Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

tab completion does not escape () #36

Closed
ipython opened this Issue · 5 comments

3 participants

@ipython

Original Launchpad bug 258721: https://bugs.launchpad.net/ipython/+bug/258721
Reported by: peter-bienstman (Peter Bienstman).

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.

@ipython

[ LP comment 1 by: Ville M. Vainio, on 2008-08-17 08:23:19.006395+00:00 ]

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

@ipython

[ LP comment 2 by: Peter Bienstman, on 2008-08-17 18:30:35.041757+00:00 ]

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

@ipython

[ LP comment 3 by: Ville M. Vainio, on 2008-08-21 09:47:31.691023+00:00 ]

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.

@batz

I posted this to the wrong bugtracker. 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
@fperez
Owner

Fix protection of special characters on tab completion.

Thanks to a patch by Batz (http://github.com/batz), added unit tests.

Closed by ec1f4d6.

@markvoorhies markvoorhies referenced this issue from a commit in markvoorhies/ipython
@fperez fperez Fix protection of special characters on tab completion.
Thanks to a patch by Batz (http://github.com/batz), added unit tests.

Closes gh-36.
ec1f4d6
@fperez fperez referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@damianavila damianavila referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@mattvonrocketstein mattvonrocketstein referenced this issue from a commit in mattvonrocketstein/ipython
@fperez fperez Fix protection of special characters on tab completion.
Thanks to a patch by Batz (http://github.com/batz), added unit tests.

Closes gh-36.
6e4bfc4
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.