Main Shell Command Prompt (

The xonsh shell

class, ctx=None, shell_type=None, **kwargs)[source]

Main xonsh shell.

Initializes execution environment and decides if prompt_toolkit or readline version of shell should be used.


execer : Execer

An execer instance capable of running xonsh code.

ctx : Mapping, optional

The execution context for the shell (e.g. the globals namespace). If none, this is computed by loading the rc files. If not None, this no additional context is computed and this is used directly.

shell_type : str, optional

The shell type to start, such as ‘readline’, ‘prompt_toolkit’, or ‘random’., show_diff=True)[source]

Returns the results of firing the precommand handles.