Skip to content

making prompt_tolkit history search configurable - #11014

Merged
minrk merged 2 commits into
masterfrom
unknown repository
Feb 20, 2018
Merged

minrk merged 2 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Feb 18, 2018

Copy link
Copy Markdown

resolve #9961
make use of os.environ to read from an envvar called enable_history_search which must be true or false, and if it's not present the default is set to True as it was before.

@willingc

Copy link
Copy Markdown
Member

Thanks @ShailynOrtiz for the PR. We'll take a look and review this.

cc/ @minrk @takluyver Submitted at the PyCaribbean sprint organized by @jzf2101

@willingc willingc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ShailynOrtiz. This looks good to me. Leaving for @takluyver or @minrk to merge.

Comment thread IPython/terminal/interactiveshell.py Outdated
completer=IPythonPTCompleter(shell=self,
patch_stdout=patch_stdout),
enable_history_search=True,
enable_history_search=(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Can you make this a Bool(True, config=True) trait rather than an environment variable? That's how we make things configurable in IPython. See highlight_matching_brackets above on L194 for a similar example (it has a default of False, but this should default to True). Then here it can be enable_history_search=self.enable_history_search.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@minrk
minrk merged commit b65d977 into ipython:master Feb 20, 2018
@willingc

Copy link
Copy Markdown
Member

Thanks!

@Carreau Carreau added this to the 7.0 milestone Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make prompt_toolkit history search configurable

4 participants