forked from VimPlug/jedi
Fix shell completion issues and documentation
This issue was raised in #990. The completer was never used in Python3.4+, because it was overwritten by Python's completer. Oddly enough it has always worked in Python2.7/3.3. The documentation was also slightly modified. os.path.join was always a complex beast.
This commit is contained in:
@@ -11,8 +11,8 @@ Then you will be able to use Jedi completer in your Python interpreter::
|
|||||||
[GCC 4.6.1] on linux2
|
[GCC 4.6.1] on linux2
|
||||||
Type "help", "copyright", "credits" or "license" for more information.
|
Type "help", "copyright", "credits" or "license" for more information.
|
||||||
>>> import os
|
>>> import os
|
||||||
>>> os.path.join().split().in<TAB> # doctest: +SKIP
|
>>> os.path.join('a', 'b').split().in<TAB> # doctest: +SKIP
|
||||||
os.path.join().split().index os.path.join().split().insert
|
...dex os.path.join().split().insert
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import jedi.utils
|
import jedi.utils
|
||||||
|
|||||||
@@ -108,6 +108,11 @@ def setup_readline(namespace_module=__main__):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
# Need to import this one as well to make sure it's executed before
|
||||||
|
# this code. This didn't use to be an issue until 3.3. Starting with
|
||||||
|
# 3.4 this is different, it always overwrites the completer if it's not
|
||||||
|
# already imported here.
|
||||||
|
import rlcompleter
|
||||||
import readline
|
import readline
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("Jedi: Module readline not available.")
|
print("Jedi: Module readline not available.")
|
||||||
|
|||||||
Reference in New Issue
Block a user