ipython / ipython

Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.
https://ipython.readthedocs.org
BSD 3-Clause "New" or "Revised" License
16.31k stars 4.45k forks source link

tab completion in presence of + sign #2376

Open andreabedini opened 12 years ago

andreabedini commented 12 years ago

Tab completion doesn't work if a file as + sign in its name.

!touch foo-bar
ls foo-b[TAB] # works
!touch foo+bar
ls foo+b[TAB] # doesn't work, it completes like b[TAB]
bfroehle commented 12 years ago

If you add quotes, it should work, i.e.: ls "foo+b[TAB]

andreabedini commented 12 years ago

Adding quotes makes no difference to me (I have just tried). I'm using IPython 0.13.

minrk commented 12 years ago

Confirmed on master on Linux and OS X. Any file completion on a string with a character in completer.DELIM that is not in completer.PROTECTABLES will exhibit this behavior. Quotes have no effect, because any quotation-based logic only seems to be applied when protected characters are detected.

mgaitan commented 11 years ago

which would be the desired behavior? "foo+b[TAB] or directly foo+b[TAB] ?

ArcTanSusan commented 10 years ago

@mgaitan The latter seems to make more sense intuitively. It seems like the fix is adding "+" to PROTECTABLES = ' ()[]{}?=\\|;:\'#*"^& to make it PROTECTABLES = ' ()[]{}?=\\|;:\'#*"^&+'. But that doesn't fix the bug. Suggestions?

andreabedini commented 9 years ago

not that I care too much about this anymore but it's still present in IPython 2.3.1 :)

andreabedini commented 8 years ago

I was hoping that this would be fixed in IPython 5 but it's still there :)