##// END OF EJS Templates
Fix autogen_shortcuts.py for prompt_toolkit 2.0
Gabriel Potter -
Show More
@@ -1,7 +1,6 b''
1 1 from os.path import abspath, dirname, join
2 2
3 from IPython.terminal.interactiveshell import KeyBindingManager
4
3 from IPython.terminal.shortcuts import create_ipython_shortcuts
5 4
6 5 def name(c):
7 6 s = c.__class__.__name__
@@ -42,8 +41,14 b' def multi_filter_str(flt):'
42 41 log_filters = {'_AndList': 'And', '_OrList': 'Or'}
43 42 log_invert = {'_Invert'}
44 43
45 kbm = KeyBindingManager.for_prompt()
46 ipy_bindings = kbm.registry.key_bindings
44 class _DummyTerminal(object):
45 """Used as a buffer to get prompt_toolkit bindings
46 """
47 handle_return = None
48 input_splitter = None
49 display_completions = None
50
51 ipy_bindings = create_ipython_shortcuts(_DummyTerminal()).bindings
47 52
48 53 dummy_docs = [] # ignore bindings without proper documentation
49 54
General Comments 0
You need to be logged in to leave comments. Login now