diff --git a/IPython/core/completer.py b/IPython/core/completer.py index 83b7775..5ce832c 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -239,7 +239,11 @@ class Completer(Configurable): but can be unsafe because the code is actually evaluated on TAB. """ ).tag(config=True) - + + backslash_combining_completions = Bool(True, + help="Enable unicode completions, e.g. \\alpha . " + "Includes completion of latex commands, unicode names, and expanding " + "unicode characters back to latex commands.").tag(config=True) def __init__(self, namespace=None, global_namespace=None, **kwargs): """Create a new completer for the command line. @@ -1127,12 +1131,12 @@ class IPCompleter(Completer): if self.use_main_ns: self.namespace = __main__.__dict__ - if PY3: + if PY3 and self.backslash_combining_completions: base_text = text if not line_buffer else line_buffer[:cursor_pos] latex_text, latex_matches = self.latex_matches(base_text) if latex_matches: - return latex_text, latex_matches + return latex_text, latex_matches name_text = '' name_matches = [] for meth in (self.unicode_name_matches, back_latex_name_matches, back_unicode_name_matches): diff --git a/docs/source/whatsnew/version5.rst b/docs/source/whatsnew/version5.rst index e1b9fed..035c3f1 100644 --- a/docs/source/whatsnew/version5.rst +++ b/docs/source/whatsnew/version5.rst @@ -16,6 +16,10 @@ that allow to customize the class used to start the terminal frontend. This should allow user to use custom interfaces, like reviving the former readline interface which is now a separate package not maintained by the core team. + +* added ``Completer.backslash_combining_completions`` boolean option to + deactivate backslash-tab completion that may conflict with windows path. + IPython 5.3 ===========