From 333a6a8051b83983e8b4236abea32c7ae4dcc811 2018-02-20 03:06:48 From: Shailyn javier Ortiz jimenez Date: 2018-02-20 03:06:48 Subject: [PATCH] Applying feedbacks - changing enable_history_search from an envvar to a configurable --- diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index 5ad6640..fcad8ed 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -206,6 +206,10 @@ class TerminalInteractiveShell(InteractiveShell): "may be changed or removed in later releases." ).tag(config=True) + enable_history_search = Bool(True, + help="Allows to enable/disable the prompt toolkit history search" + ).tag(config=True) + @observe('term_title') def init_term_title(self, change=None): # Enable or disable the terminal title. @@ -269,11 +273,7 @@ class TerminalInteractiveShell(InteractiveShell): history=history, completer=IPythonPTCompleter(shell=self, patch_stdout=patch_stdout), - enable_history_search=( - os.environ['enable_history_search'].capitalize() - if 'enable_history_search' in os.environ - else True - ), + enable_history_search=self.enable_history_search, style=self.style, mouse_support=self.mouse_support, **self._layout_options()