Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

tab completion does not escape () #36

Closed
ipython opened this Issue May 10, 2010 · 5 comments

Comments

Projects
None yet
3 participants
@ghost

ghost commented May 10, 2010

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.

@ghost

ghost commented May 10, 2010

[ 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.

@ghost

ghost commented May 10, 2010

[ 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.

@ghost

ghost commented May 10, 2010

[ 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 commented Oct 22, 2010

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
Owner

fperez commented Oct 22, 2010

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 pushed a commit to markvoorhies/ipython that referenced this issue Apr 21, 2011

@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

@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

@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