xonsh.xonfig#
The xonsh configuration (xonfig) utility.
- class xonsh.xonfig.XonfigAlias(**kwargs)[source]#
Manage xonsh configuration.
- exception Error(message: str, errno=1)#
Special case, when raised, the traceback will not be shown. Instead the process with exit with error code and message
- with_traceback()#
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args#
- create_parser(func=None, has_args=False, allowed_params=None, **kwargs)#
create root parser
- err(*args, **kwargs)#
Write text to error stream
- hook_post_add_argument(*, parser: xonsh.cli_utils.ArgParser | argparse.ArgumentParser, action: argparse.Action, param: str, func: Callable)#
Hook into parser.add_argument step.
Can be used to update action’s attributes
- hook_pre_add_argument(param: str, func, flags, kwargs)#
Hook to update arguments that are passed to parser.add_argument
- out(*args, **kwargs)#
Write text to output stream
- write_to(stream: str, *args, **kwargs)#
- xonsh_complete(command, **kwargs)#
- property parser#
- xonsh.xonfig.make_xonfig_wizard(default_file=None, confirm=False, no_wizard_file=None)[source]#
Makes a configuration wizard for xonsh config file.
- Parameters
- default_filestr, optional
Default filename to save and load to. User will still be prompted.
- confirmbool, optional
Confirm that the main part of the wizard should be run.
- no_wizard_filestr, optional
Filename for that will flag to future runs that the wizard should not be run again. If None (default), this defaults to default_file.
- xonsh.xonfig.make_xontrib(xon_item: Tuple[str, xonsh.xontribs.Xontrib])[source]#
Makes a message and StoreNonEmpty node for a xontrib.