diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 75cf25ea66e..a6d3edf1f7a 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -388,7 +388,9 @@ def _displayhook_class_default(self): ).tag(config=True) enable_history_search = Bool(True, - help="Allows to enable/disable the prompt toolkit history search" + help="Allows to enable/disable the prompt toolkit history search. " + "This option conflicts with `complete_while_typing`. " + "If this is set to `True`, the option `complete_while_typing` will be ignored" ).tag(config=True) autosuggestions_provider = Unicode( @@ -401,6 +403,12 @@ def _displayhook_class_default(self): allow_none=True, ).tag(config=True) + complete_while_typing = Bool(False, + help="Generate autocompletions while typing or when the tab key is pressed. " + "This option conflicts with `enable_history_search`. " + "If `enable_history_search` is `True`, this option will not take effect." + ).tag(config=True) + def _set_autosuggestions(self, provider): # disconnect old handler if self.auto_suggest and isinstance( @@ -639,6 +647,7 @@ def prompt(): history=history, completer=IPythonPTCompleter(shell=self), enable_history_search=self.enable_history_search, + complete_while_typing=self.complete_while_typing, style=self.style, include_default_pygments_style=False, mouse_support=self.mouse_support,