Replay History (
Tools to replay xonsh history files.
Replays a xonsh history file.
f : file handle or str
Path to xonsh history file.
reopen : bool, optional
Whether new file handle should be opened for each load, passed directly into LazyJSON class.
replay(merge_envs=('replay', 'native'), target=None)¶
Replays the history specified, returns the history object where the code was executed.
merge_env : tuple of str or Mappings, optional
Describes how to merge the environments, in order of increasing precednce. Available strings are ‘replay’ and ‘native’. The ‘replay’ env comes from the history file that we are replaying. The ‘native’ env comes from what this instance of xonsh was started up with. Instead of a string, a dict or other mapping may be passed in as well. Defaults to (‘replay’, ‘native’).
target : str, optional
Path to new history file.
Acts as main function for replaying a xonsh history file.
replay_main_action(h, ns, stdout=None, stderr=None)¶