{ } Raw JSON

bundles / IPython 9.17.0 / IPython / core / history / HistoryAccessor / search

function

IPython.core.history:HistoryAccessor.search

source: /dev/ipython/IPython/core/history.py:576

Signature

def search(self, pattern: str = *, raw: bool = True, search_raw: bool = True, output: bool = False, n: int | None = None, unique: bool = False) → Iterable[tuple[int, int, InOrInOut]]

Summary

Search the database using unix glob-style matching (wildcards * and ?).

Parameters

pattern : str

The wildcarded pattern to match when searching

search_raw : bool

If True, search the raw input, otherwise, the parsed input

raw, output : bool

See get_range

n : None or int

If an integer is given, it defines the limit of returned entries.

unique : bool

When it is true, return only unique entries.

Returns

Tuples as : meth:`get_range`

Aliases

  • IPython.core.history.HistoryAccessor.search