Show More
@@ -239,7 +239,11 b' class Completer(Configurable):' | |||||
239 | but can be unsafe because the code is actually evaluated on TAB. |
|
239 | but can be unsafe because the code is actually evaluated on TAB. | |
240 | """ |
|
240 | """ | |
241 | ).tag(config=True) |
|
241 | ).tag(config=True) | |
242 |
|
242 | |||
|
243 | backslash_combining_completions = Bool(True, | |||
|
244 | help="Enable unicode completions, e.g. \\alpha<tab> . " | |||
|
245 | "Includes completion of latex commands, unicode names, and expanding " | |||
|
246 | "unicode characters back to latex commands.").tag(config=True) | |||
243 |
|
247 | |||
244 | def __init__(self, namespace=None, global_namespace=None, **kwargs): |
|
248 | def __init__(self, namespace=None, global_namespace=None, **kwargs): | |
245 | """Create a new completer for the command line. |
|
249 | """Create a new completer for the command line. | |
@@ -1127,12 +1131,12 b' class IPCompleter(Completer):' | |||||
1127 | if self.use_main_ns: |
|
1131 | if self.use_main_ns: | |
1128 | self.namespace = __main__.__dict__ |
|
1132 | self.namespace = __main__.__dict__ | |
1129 |
|
1133 | |||
1130 | if PY3: |
|
1134 | if PY3 and self.backslash_combining_completions: | |
1131 |
|
1135 | |||
1132 | base_text = text if not line_buffer else line_buffer[:cursor_pos] |
|
1136 | base_text = text if not line_buffer else line_buffer[:cursor_pos] | |
1133 | latex_text, latex_matches = self.latex_matches(base_text) |
|
1137 | latex_text, latex_matches = self.latex_matches(base_text) | |
1134 | if latex_matches: |
|
1138 | if latex_matches: | |
1135 |
|
|
1139 | return latex_text, latex_matches | |
1136 | name_text = '' |
|
1140 | name_text = '' | |
1137 | name_matches = [] |
|
1141 | name_matches = [] | |
1138 | for meth in (self.unicode_name_matches, back_latex_name_matches, back_unicode_name_matches): |
|
1142 | for meth in (self.unicode_name_matches, back_latex_name_matches, back_unicode_name_matches): |
@@ -16,6 +16,10 b' that allow to customize the class used to start the terminal frontend. This' | |||||
16 | should allow user to use custom interfaces, like reviving the former readline |
|
16 | should allow user to use custom interfaces, like reviving the former readline | |
17 | interface which is now a separate package not maintained by the core team. |
|
17 | interface which is now a separate package not maintained by the core team. | |
18 |
|
18 | |||
|
19 | ||||
|
20 | * added ``Completer.backslash_combining_completions`` boolean option to | |||
|
21 | deactivate backslash-tab completion that may conflict with windows path. | |||
|
22 | ||||
19 | IPython 5.3 |
|
23 | IPython 5.3 | |
20 | =========== |
|
24 | =========== | |
21 |
|
25 |
General Comments 0
You need to be logged in to leave comments.
Login now