xonsh/news/history_match_anywhere.rst
Gil Forsyth baf7158891 Add history matching toggle to search entire line
Default behavior of prompt_toolkit on an up-arrow history search is to use a
`startswith` check to match previous entries.
This introduces an environment variable `XONSH_HISTORY_MATCH_ANYWHERE` that, if
`True`, will instead perform a history search with an `is in` to allow matching
anywhere.

This could potentially have performance impacts depending on how many history
items are being searched, so I've defaulted it to `False` but I'm open to input
on that (or any of the rest of it).
2018-08-23 15:41:21 -04:00

16 lines
360 B
ReStructuredText

**Added:**
* Added new env-var ``XONSH_HISTORY_MATCH_ANYWHERE``. If set to ``True`` then
up-arrow history matching will match existing history entries with the search
term located anywhere, not just at the beginning of the line. Default value is
``False``
**Changed:** None
**Deprecated:** None
**Removed:** None
**Fixed:** None
**Security:** None