This documentation covers a development version of IPython. The development version may differ significantly from the latest stable release.
This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than 3.3 including all versions of Python 2.7.
If you are looking for an IPython version compatible with Python 2.7, please use the IPython 5.x LTS release and refer to its documentation (LTS is the long term support release).
History Range Glob feature¶
Previously, when using
%history, users could specify either
a range of sessions and lines, for example:
~8/1-~6/5 # see history from the first line of 8 sessions ago, # to the fifth line of 6 sessions ago.``
Or users could specify a glob pattern:
-g <pattern> # glob ALL history for the specified pattern.
However users could not specify both.
If a user did specify both a range and a glob pattern, then the glob pattern would be used (globbing all history) and the range would be ignored.
With this enhancment, if a user specifies both a range and a glob pattern, then the glob pattern will be applied to the specified range of history.