xonsh.history.dummy¶
Implements the xonsh history backend.
- class xonsh.history.dummy.DummyHistory(sessionid=None, **kwargs)[source]¶
A dummy implement of history backend.
Represents a xonsh session’s history.
- Parameters
- sessionidint, uuid, str, optional
Current session identifier, will generate a new sessionid if not set.
- append(cmd)[source]¶
Append a command item into history.
- Parameters
- cmd: dict
This dict contains information about the command that is to be added to the history list. It should contain the keys
inp
,rtn
andts
. These key names mirror the same names defined as instance variables in theHistoryEntry
class.
- clear()¶
Clears the history of the current session from both the disk and memory.
- flush(**kwargs)¶
Flush the history items to disk from a buffer.
- info()[source]¶
A collection of information about the shell history.
- Returns
- dict or collections.OrderedDict
Contains history information as str key pairs.
- run_gc(size=None, blocking=True)¶
Run the garbage collector.
- Parameters
- size: None or tuple of a int and a string
Determines the size and units of what would be allowed to remain.
- blocking: bool
If set blocking, then wait until gc action finished.