xonsh.shell¶
The xonsh shell
- class xonsh.shell.Shell(execer, 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.
- Parameters:
- execerExecer
An execer instance capable of running xonsh code.
- ctxMapping, 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_typestr, optional
The shell type to start, such as ‘readline’, ‘prompt_toolkit1’, or ‘random’.
- shell_type_aliases = {'b': 'best', 'best': 'best', 'd': 'dumb', 'dumb': 'dumb', 'prompt-toolkit': 'prompt_toolkit', 'prompt_toolkit': 'prompt_toolkit', 'ptk': 'prompt_toolkit', 'rand': 'random', 'random': 'random', 'readline': 'readline', 'rl': 'readline'}¶