Environment (xonsh.environ)

Environment for the xonsh shell.

class xonsh.environ.AsyncPromptSetting[source]

Asynchronous Prompt Load $PROMPT in background without blocking read-eval loop.

classmethod get_doc()
classmethod get_group_description()str
classmethod get_group_title()str
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]]
ASYNC_INVALIDATE_INTERVAL = Var(validate=<function is_float>, convert=<class 'float'>, detype=<class 'str'>, default=0.05, doc='When ENABLE_ASYNC_PROMPT is True, it may call the redraw frequently. This is to group such calls into one that happens within that timeframe. The number is set in seconds.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
ASYNC_PROMPT_THREAD_WORKERS = Var(validate=<function is_int>, convert=<function to_int_or_none>, detype=<class 'str'>, default=None, doc="Define the number of workers used by the ASYC_PROPMT's pool. By default it is the same as defined by Python's concurrent.futures.ThreadPoolExecutor class.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
AUTO_SUGGEST = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Enable automatic command suggestions based on history, like in the fish shell.\n\nPressing the right arrow key inserts the currently displayed suggestion. ', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
AUTO_SUGGEST_IN_COMPLETIONS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Places the auto-suggest result as the first option in the completions. This enables you to tab complete the auto-suggestion.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
BOTTOM_TOOLBAR = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='Template string for the bottom toolbar. This may be parametrized in the same way as the ``$PROMPT`` variable. Currently, this is only available in the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COLOR_INPUT = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag for syntax highlighting interactive input.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COLOR_RESULTS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag for syntax highlighting return values.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
DYNAMIC_CWD_ELISION_CHAR = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc="The string used to show a shortened directory in a shortened cwd, e.g. ``'…'``.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
DYNAMIC_CWD_WIDTH = Var(validate=<function is_dynamic_cwd_width>, convert=<function to_dynamic_cwd_tuple>, detype=<function dynamic_cwd_tuple_to_str>, default=(inf, 'c'), doc='Maximum length in number of characters or as a percentage for the ``cwd`` prompt variable. For example, "20" is a twenty character width and "10%" is ten percent of the number of columns available.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
ENABLE_ASYNC_PROMPT = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='When enabled the prompt is rendered using threads. $PROMPT_FIELD that take long will be updated in the background and will not affect prompt speed. ', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
HISTCONTROL = Var(validate=<function is_string_set>, convert=<function csv_to_set>, detype=<function set_to_csv>, default=set(), doc='A set of strings (comma-separated list in string form) of options that determine what commands are saved to the history list. By default all commands are saved. The option ``ignoredups`` will not save the command if it matches the previous command. The option ``ignoreerr`` will cause any commands that fail (i.e. return non-zero exit status) to not be added to the history list. The option ``erasedups`` will remove all previous commands that matches and updates the frequency. Note: ``erasedups`` is supported only in sqlite backend).', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=True, pattern=None)
IGNOREEOF = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Prevents Ctrl-D from exiting the shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
INDENT = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='    ', doc='Indentation string for multiline input', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LS_COLORS = Var(validate=<function is_lscolors>, convert=<bound method LsColors.convert of <class 'xonsh.environ.LsColors'>>, detype=<function detype>, default=<function default_lscolors>, doc="Color settings for ``ls`` command line utility and, with ``$SHELL_TYPE='prompt_toolkit'``, file arguments in subprocess mode.", is_configurable=True, doc_default='``*.7z=1;0;31:*.Z=1;0;31:*.aac=0;36:*.ace=1;0;31:*.alz=1;0;31:*.arc=1;0;31:*.arj=1;0;31:*.asf=1;0;35:*.au=0;36:*.avi=1;0;35:*.bmp=1;0;35:*.bz=1;0;31:*.bz2=1;0;31:*.cab=1;0;31:*.cgm=1;0;35:*.cpio=1;0;31:*.deb=1;0;31:*.dl=1;0;35:*.dwm=1;0;31:*.dz=1;0;31:*.ear=1;0;31:*.emf=1;0;35:*.esd=1;0;31:*.flac=0;36:*.flc=1;0;35:*.fli=1;0;35:*.flv=1;0;35:*.gif=1;0;35:*.gl=1;0;35:*.gz=1;0;31:*.jar=1;0;31:*.jpeg=1;0;35:*.jpg=1;0;35:*.lha=1;0;31:*.lrz=1;0;31:*.lz=1;0;31:*.lz4=1;0;31:*.lzh=1;0;31:*.lzma=1;0;31:*.lzo=1;0;31:*.m2v=1;0;35:*.m4a=0;36:*.m4v=1;0;35:*.mid=0;36:*.midi=0;36:*.mjpeg=1;0;35:*.mjpg=1;0;35:*.mka=0;36:*.mkv=1;0;35:*.mng=1;0;35:*.mov=1;0;35:*.mp3=0;36:*.mp4=1;0;35:*.mp4v=1;0;35:*.mpc=0;36:*.mpeg=1;0;35:*.mpg=1;0;35:*.nuv=1;0;35:*.oga=0;36:*.ogg=0;36:*.ogm=1;0;35:*.ogv=1;0;35:*.ogx=1;0;35:*.opus=0;36:*.pbm=1;0;35:*.pcx=1;0;35:*.pgm=1;0;35:*.png=1;0;35:*.ppm=1;0;35:*.qt=1;0;35:*.ra=0;36:*.rar=1;0;31:*.rm=1;0;35:*.rmvb=1;0;35:*.rpm=1;0;31:*.rz=1;0;31:*.sar=1;0;31:*.spx=0;36:*.svg=1;0;35:*.svgz=1;0;35:*.swm=1;0;31:*.t7z=1;0;31:*.tar=1;0;31:*.taz=1;0;31:*.tbz=1;0;31:*.tbz2=1;0;31:*.tga=1;0;35:*.tgz=1;0;31:*.tif=1;0;35:*.tiff=1;0;35:*.tlz=1;0;31:*.txz=1;0;31:*.tz=1;0;31:*.tzo=1;0;31:*.tzst=1;0;31:*.vob=1;0;35:*.war=1;0;31:*.wav=0;36:*.webm=1;0;35:*.wim=1;0;31:*.wmv=1;0;35:*.xbm=1;0;35:*.xcf=1;0;35:*.xpm=1;0;35:*.xspf=0;36:*.xwd=1;0;35:*.xz=1;0;31:*.yuv=1;0;35:*.z=1;0;31:*.zip=1;0;31:*.zoo=1;0;31:*.zst=1;0;31:bd=40;0;33:ca=0;30;41:cd=40;0;33:di=1;0;34:do=1;0;35:ex=1;0;32:ln=1;0;36:mh=0:mi=0:or=40;0;31:ow=0;34;42:pi=40;0;33:rs=0:sg=0;30;43:so=1;0;35:st=0;37;44:su=0;37;41:tw=0;30;42``', can_store_as_str=False, pattern=None)
MOUSE_SUPPORT = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Enable mouse support in the ``prompt_toolkit`` shell. This allows clicking for positioning the cursor or selecting a completion. In some terminals however, this disables the ability to scroll back through the history of the terminal. Only usable with ``$SHELL_TYPE=prompt_toolkit``', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
MULTILINE_PROMPT = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='.', doc='Prompt text for 2nd+ lines of input, may be str or function which returns a str.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PRETTY_PRINT_RESULTS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag for "pretty printing" return values.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PROMPT = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='{env_name}{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch: {}}{RESET} {BOLD_BLUE}{prompt_end}{RESET} ', doc="The prompt text. May contain keyword arguments which are auto-formatted, see 'Customizing the Prompt' at http://xon.sh/tutorial.html#customizing-the-prompt. This value is never inherited from parent processes.", is_configurable=True, doc_default='``xonsh.environ.DEFAULT_PROMPT``', can_store_as_str=False, pattern=None)
PROMPT_FIELDS = Var(validate=<function always_true>, convert=None, detype=None, default={'user': 'travis', 'prompt_end': '$', 'hostname': 'travis-job-695aad1c-b6c6-4b99-8627-43884c1722cf', 'cwd': <function _dynamically_collapsed_pwd>, 'cwd_dir': <function PROMPT_FIELDS.<locals>.<lambda>>, 'cwd_base': <function PROMPT_FIELDS.<locals>.<lambda>>, 'short_cwd': <function _collapsed_pwd>, 'curr_branch': <function current_branch>, 'branch_color': <function branch_color>, 'branch_bg_color': <function branch_bg_color>, 'current_job': <function _current_job>, 'env_name': <function env_name>, 'env_prefix': '(', 'env_postfix': ') ', 'vte_new_tab_cwd': <function vte_new_tab_cwd>, 'gitstatus': <function gitstatus_prompt>, 'time_format': '%H:%M:%S', 'localtime': <function _localtime>}, doc="Dictionary containing variables to be used when formatting $PROMPT and $TITLE. See 'Customizing the Prompt' http://xon.sh/tutorial.html#customizing-the-prompt", is_configurable=False, doc_default='``xonsh.prompt.PROMPT_FIELDS``', can_store_as_str=False, pattern=None)
PROMPT_REFRESH_INTERVAL = Var(validate=<function is_float>, convert=<class 'float'>, detype=<class 'str'>, default=0.0, doc='Interval (in seconds) to evaluate and update ``$PROMPT``, ``$RIGHT_PROMPT`` and ``$BOTTOM_TOOLBAR``. The default is zero (no update). NOTE: ``$UPDATE_PROMPT_ON_KEYPRESS`` must be set to ``True`` for this variable to take effect.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PROMPT_TOKENS_FORMATTER = Var(validate=<built-in function callable>, convert=None, detype=None, default=<function prompt_tokens_formatter_default>, doc='Final processor that receives all tokens in the prompt template. It gives option to format the prompt with different prefix based on other tokens values. Highly useful for implementing something like powerline theme.', is_configurable=True, doc_default='``xonsh.prompt.base.prompt_tokens_formatter_default``', can_store_as_str=False, pattern=None)
PROMPT_TOOLKIT_COLOR_DEPTH = Var(validate=<function always_false>, convert=<function ptk2_color_depth_setter>, detype=<function ensure_string>, default='', doc='The color depth used by prompt toolkit 2. Possible values are: ``DEPTH_1_BIT``, ``DEPTH_4_BIT``, ``DEPTH_8_BIT``, ``DEPTH_24_BIT`` colors. Default is an empty string which means that prompt toolkit decide.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PTK_STYLE_OVERRIDES = Var(validate=<function is_str_str_dict>, convert=<function to_str_str_dict>, detype=<function dict_to_str>, default={}, doc='A dictionary containing custom prompt_toolkit style definitions. (deprecated)', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
RIGHT_PROMPT = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='Template string for right-aligned text at the prompt. This may be parametrized in the same way as the ``$PROMPT`` variable. Currently, this is only available in the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SHELL_TYPE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='best', doc="Which shell is used. Currently two base shell types are supported:\n\n    - ``readline`` that is backed by Python's readline module\n    - ``prompt_toolkit`` that uses external library of the same name\n    - ``random`` selects a random shell from the above on startup\n    - ``best`` selects the most feature-rich shell available on the\n       user's system\n\nTo use the ``prompt_toolkit`` shell you need to have the `prompt_toolkit <https://github.com/jonathanslenders/python-prompt-toolkit>`_ library installed. To specify which shell should be used, do so in the run control file.", is_configurable=True, doc_default='``best``', can_store_as_str=False, pattern=None)
SUGGEST_COMMANDS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='When a user types an invalid command, xonsh will try to offer suggestions of similar valid commands if this is True.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUGGEST_MAX_NUM = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=5, doc='xonsh will show at most this many suggestions in response to an invalid command. If negative, there is no limit to how many suggestions are shown.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUGGEST_THRESHOLD = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=3, doc='An error threshold. If the Levenshtein distance between the entered command and a valid command is less than this value, the valid command will be offered as a suggestion.  Also used for "fuzzy" tab completion of paths.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUPPRESS_BRANCH_TIMEOUT_MESSAGE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to suppress branch timeout warning messages when getting {gitstatus} PROMPT_FIELD.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
TITLE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='{current_job:{} | }{user}@{hostname}: {cwd} | xonsh', doc="The title text for the window in which xonsh is running. Formatted in the same manner as ``$PROMPT``, see 'Customizing the Prompt' http://xon.sh/tutorial.html#customizing-the-prompt.", is_configurable=True, doc_default='``xonsh.environ.DEFAULT_TITLE``', can_store_as_str=False, pattern=None)
UPDATE_PROMPT_ON_KEYPRESS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Disables caching the prompt between commands, so that it would be reevaluated on each keypress. Disabled by default because of the incurred performance penalty.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VC_BRANCH_TIMEOUT = Var(validate=<function is_float>, convert=<class 'float'>, detype=<class 'str'>, default=0.1, doc='The timeout (in seconds) for version control branch computations. This is a timeout per subprocess call, so the total time to compute will be larger than this in many cases.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VC_GIT_INCLUDE_UNTRACKED = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc="Whether or not untracked file changes should count as 'dirty' in git.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VC_HG_SHOW_BRANCH = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Whether or not to show the Mercurial branch in the prompt.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VIRTUAL_ENV = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<xonsh.tools.DefaultNotGivenType object>, doc='Path to the currently active Python environment.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VI_MODE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Flag to enable ``vi_mode`` in the ``prompt_toolkit`` shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_AUTOPAIR = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether Xonsh will auto-insert matching parentheses, brackets, and quotes. Only available under the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_GITSTATUS_ = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='Symbols for gitstatus prompt. Default values are: \n\n* ``XONSH_GITSTATUS_HASH``: ``:``\n* ``XONSH_GITSTATUS_BRANCH``: ``{CYAN}``\n* ``XONSH_GITSTATUS_OPERATION``: ``{CYAN}``\n* ``XONSH_GITSTATUS_STAGED``: ``{RED}●``\n* ``XONSH_GITSTATUS_CONFLICTS``: ``{RED}×``\n* ``XONSH_GITSTATUS_CHANGED``: ``{BLUE}+``\n* ``XONSH_GITSTATUS_UNTRACKED``: ``…``\n* ``XONSH_GITSTATUS_STASHED``: ``⚑``\n* ``XONSH_GITSTATUS_CLEAN``: ``{BOLD_GREEN}✓``\n* ``XONSH_GITSTATUS_AHEAD``: ``↑·``\n* ``XONSH_GITSTATUS_BEHIND``: ``↓·``\n', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern='XONSH_GITSTATUS_*')
XONSH_HISTORY_BACKEND = Var(validate=<function is_history_backend>, convert=<function to_itself>, detype=<function ensure_string>, default='json', doc="Set which history backend to use. Options are: 'json', 'sqlite', and 'dummy'. The default is 'json'. ``XONSH_HISTORY_BACKEND`` also accepts a class type that inherits from ``xonsh.history.base.History``, or its instance.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_HISTORY_FILE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='/home/travis/.xonsh_history.json', doc='Location of history file (deprecated).', is_configurable=False, doc_default='``~/.xonsh_history``', can_store_as_str=False, pattern=None)
XONSH_HISTORY_MATCH_ANYWHERE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='When searching history from a partial string (by pressing up arrow), match command history anywhere in a given line (not just the start)', is_configurable=True, doc_default='False', can_store_as_str=False, pattern=None)
XONSH_HISTORY_SIZE = Var(validate=<function is_history_tuple>, convert=<function to_history_tuple>, detype=<function history_tuple_to_str>, default=(8128, 'commands'), doc="Value and units tuple that sets the size of history after garbage collection. Canonical units are:\n\n- ``commands`` for the number of past commands executed,\n- ``files`` for the number of history files to keep,\n- ``s`` for the number of seconds in the past that are allowed, and\n- ``b`` for the number of bytes that history may consume.\n\nCommon abbreviations, such as '6 months' or '1 GB' are also allowed.", is_configurable=True, doc_default="``(8128, 'commands')`` or ``'8128 commands'``", can_store_as_str=False, pattern=None)
XONSH_STDERR_POSTFIX = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='A format string, using the same keys and colors as ``$PROMPT``, that is appended whenever stderr is displayed. This may be used in conjunction with ``$XONSH_STDERR_PREFIX`` to start the block.For example, to have stderr appear on a red background, the prefix & postfix pair would be "{BACKGROUND_RED}" & "{RESET}".', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_STDERR_PREFIX = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='A format string, using the same keys and colors as ``$PROMPT``, that is prepended whenever stderr is displayed. This may be used in conjunction with ``$XONSH_STDERR_POSTFIX`` to close out the block.For example, to have stderr appear on a red background, the prefix & postfix pair would be "{BACKGROUND_RED}" & "{RESET}".', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
class xonsh.environ.AutoCompletionSetting[source]

Tab-completion behavior.

classmethod get_doc()
classmethod get_group_description()str
classmethod get_group_title()str
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]]
BASH_COMPLETIONS = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=('/usr/share/bash-completion/bash_completion',), doc='This is a list (or tuple) of strings that specifies where the ``bash_completion`` script may be found. The first valid path will be used. For better performance, bash-completion v2.x is recommended since it lazy-loads individual completion scripts. For both bash-completion v1.x and v2.x, paths of individual completion scripts (like ``.../completes/ssh``) do not need to be included here. The default values are platform dependent, but sane. To specify an alternate list, do so in the run control file.', is_configurable=True, doc_default="Normally this is:\n\n    ``('/usr/share/bash-completion/bash_completion', )``\n\nBut, on Mac it is:\n\n    ``('/usr/local/share/bash-completion/bash_completion', '/usr/local/etc/bash_completion')``\n\nOther OS-specific defaults may be added in the future.", can_store_as_str=False, pattern=None)
CASE_SENSITIVE_COMPLETIONS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=<xonsh.lazyasd.LazyBool object>, doc='Sets whether completions should be case sensitive or case insensitive.', is_configurable=True, doc_default='True on Linux, False otherwise.', can_store_as_str=False, pattern=None)
COMPLETIONS_BRACKETS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag to enable/disable inclusion of square brackets and parentheses in Python attribute completions.', is_configurable=True, doc_default='True', can_store_as_str=False, pattern=None)
COMPLETION_QUERY_LIMIT = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=100, doc='The number of completions to display before the user is asked for confirmation.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
FUZZY_PATH_COMPLETION = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc="Toggles 'fuzzy' matching of paths for tab completion, which is only used as a fallback if no other completions succeed but can be used as a way to adjust for typographical errors. If ``True``, then, e.g., ``xonhs`` will match ``xonsh``.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUBSEQUENCE_PATH_COMPLETION = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Toggles subsequence matching of paths for tab completion. If ``True``, then, e.g., ``~/u/ro`` can match ``~/lou/carcolh``.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
class xonsh.environ.ChangeDirSetting[source]

cd Behavior

classmethod get_doc()
classmethod get_group_description()str
classmethod get_group_title()str
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]]
AUTO_CD = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Flag to enable changing to a directory by entering the dirname or full path only (without the cd command).', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
AUTO_PUSHD = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Flag for automatically pushing directories onto the directory stack.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
CDPATH = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=(), doc='A list of paths to be used as roots for a cd, breaking compatibility with Bash, xonsh always prefer an existing relative path.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
DIRSTACK_SIZE = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=20, doc='Maximum size of the directory stack.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PUSHD_MINUS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Flag for directory pushing functionality. False is the normal behavior.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PUSHD_SILENT = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to suppress directory stack manipulation output.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
class xonsh.environ.Env(*args, **kwargs)[source]

A xonsh environment, whose variables have limited typing (unlike BASH). Most variables are, by default, strings (like BASH). However, the following rules also apply based on variable-name:

  • PATH: any variable whose name ends in PATH is a list of strings.

  • XONSH_HISTORY_SIZE: this variable is an (int | float, str) tuple.

  • LC_* (locale categories): locale category names get/set the Python locale via locale.getlocale() and locale.setlocale() functions.

An Env instance may be converted to an untyped version suitable for use in a subprocess.

If no initial environment is given, os_environ is used.

clear()None.  Remove all items from D.
deregister(name)[source]

Deregister an enviornment variable and all its type handling, default value, doc.

Parameters
namestr

Environment variable name to deregister. Typically all caps.

detype()[source]
get(key, default=None)[source]

The environment will look up default values from its own defaults if a default is not given here.

get_converter(key, default=None)[source]

Gets a converter for the given key.

get_default(key, default=None)[source]

Gets default for the given key.

get_detyper(key, default=None)[source]

Gets a detyper for the given key.

get_docs(key, default=None)[source]

Gets the documentation for the environment variable.

get_validator(key, default=None)[source]

Gets a validator for the given key.

help(key)[source]

Get information about a specific environment variable.

is_manually_set(varname)[source]

Checks if an environment variable has been manually set.

items()a set-like object providing a view on D’s items
keys()a set-like object providing a view on D’s keys
pop(k[, d])v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()(k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

rawkeys()[source]

An iterator that returns all environment keys in their original form. This include string & compiled regular expression keys.

register(name, type=None, default=None, doc='', validate=<function always_true>, convert=None, detype=<function ensure_string>, is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False)[source]

Register an enviornment variable with optional type handling, default value, doc.

Parameters
namestr

Environment variable name to register. Typically all caps.

typestr, optional, {‘bool’, ‘str’, ‘path’, ‘env_path’, ‘int’, ‘float’}

Variable type. If not one of the available presets, use validate, convert, and detype to specify type behavior.

defaultoptional

Default value for variable. ValueError raised if type does not match that specified by type (or validate).

docstr, optional

Docstring for variable.

validatefunc, optional

Function to validate type.

convertfunc, optional

Function to convert variable from a string representation to its type.

detypefunc, optional

Function to convert variable from its type to a string representation.

is_configurablebool, optional

Flag for whether the environment variable is configurable or not.

doc_defaultstr, optional

Custom docstring for the default value for complex defaults.

can_store_as_strbool, optional

Flag for whether the environment variable should be stored as a string. This is used when persisting a variable that is not JSON serializable to the config file. For example, sets, frozensets, and potentially other non-trivial data types. default, False.

replace_env()[source]

Replaces the contents of os_environ with a detyped version of the xonsh environment.

setdefault(k[, d])D.get(k,d), also set D[k]=d if k not in D
swap(other=None, **kwargs)[source]

Provides a context manager for temporarily swapping out certain environment variables with other values. On exit from the context manager, the original values are restored.

undo_replace_env()[source]

Replaces the contents of os_environ with a detyped version of the xonsh environment.

update([E, ]**F)None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values()an object providing a view on D’s values
class xonsh.environ.GeneralSetting[source]

General

classmethod get_doc()
classmethod get_group_description()str
classmethod get_group_title()str
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]]
AUTO_CONTINUE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='If ``True``, automatically resume stopped jobs when they are disowned. When stopped jobs are disowned and this option is ``False``, a warning will print information about how to continue the stopped process.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COMMANDS_CACHE_SIZE_WARNING = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=6000, doc='Number of files on the PATH above which a warning is shown.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
HOSTNAME = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<function GeneralSetting.<lambda>>, doc='Automatically set to the name of the current host.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
HOSTTYPE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<function GeneralSetting.<lambda>>, doc='Automatically set to a string that fully describes the system type on which xonsh is executing.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LANG = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='C.UTF-8', doc='Fallback locale setting for systems where it matters', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_COLLATE = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_CTYPE = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_MESSAGES = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_MONETARY = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_NUMERIC = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_TIME = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LOADED_RC_FILES = Var(validate=<function is_bool_seq>, convert=<function csv_to_bool_seq>, detype=<function bool_seq_to_csv>, default=(), doc="Whether or not any of the xonsh run control files were loaded at startup. This is a sequence of bools in Python that is converted to a CSV list in string form, ie ``[True, False]`` becomes ``'True,False'``.", is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
OLDPWD = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='.', doc='Used to represent a previous present working directory.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PATH = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=('/home/travis/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/usr/games', '/usr/local/games'), doc='List of strings representing where to look for executables.', is_configurable=True, doc_default="On Windows: it is ``Path`` value of register's ``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment``. On Mac OSX: ``('/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin')`` On Linux & on Cygwin & on MSYS, when detected that the distro is like arch, the default PATH is ``('/usr/local/sbin', '/usr/local/bin', '/usr/bin', '/usr/bin/site_perl', '/usr/bin/vendor_perl', '/usr/bin/core_perl')`` and otherwise is ``('~/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin','/usr/bin', '/sbin', '/bin', '/usr/games', '/usr/local/games')``", can_store_as_str=False, pattern=None)
PATHEXT = Var(validate=<function is_nonstring_seq_of_strings>, convert=<function pathsep_to_upper_seq>, detype=<function seq_to_upper_pathsep>, default=[], doc='Sequence of extension strings (eg, ``.EXE``) for filtering valid executables by. Each element must be uppercase.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
RAISE_SUBPROC_ERROR = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to raise an error if a subprocess (captured or uncaptured) returns a non-zero exit status, which indicates failure. This is most useful in xonsh scripts or modules where failures should cause an end to execution. This is less useful at a terminal. The error that is raised is a ``subprocess.CalledProcessError``.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
STAR_DIRS = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=<xonsh.tools.DefaultNotGivenType object>, doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=re.compile('\\w*DIRS$'))
STAR_PATH = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=<xonsh.tools.DefaultNotGivenType object>, doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=re.compile('\\w*PATH$'))
TERM = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<xonsh.tools.DefaultNotGivenType object>, doc='TERM is sometimes set by the terminal emulator. This is used (when valid) to determine whether the terminal emulator can support the selected shell, or whether or not to set the title. Users shouldn\'t need to set this themselves. Note that this variable should be set as early as possible in order to ensure it is effective. Here are a few options:\n\n* Set this from the program that launches xonsh. On POSIX systems, \n  this can be performed by using env, e.g. \n  ``/usr/bin/env TERM=xterm-color xonsh`` or similar.\n* From the xonsh command line, namely ``xonsh -DTERM=xterm-color``.\n* In the config file with ``{"env": {"TERM": "xterm-color"}}``.\n* Lastly, in xonshrc with ``$TERM``\n\nIdeally, your terminal emulator will set this correctly but that does not always happen.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
THREAD_SUBPROCS = Var(validate=<function is_bool_or_none>, convert=<function to_bool_or_none>, detype=<function bool_or_none_to_str>, default=True, doc='Whether or not to try to run subrocess mode in a Python thread, when applicable. There are various trade-offs, which normally affects only interactive sessions.\n\nWhen True:\n\n* Xonsh is able capture & store the stdin, stdout, and stderr \n  of threadable subprocesses.\n* However, stopping threaded subprocs with ^Z (i.e. ``SIGTSTP``)\n  is disabled as it causes deadlocked terminals.\n  ``SIGTSTP`` may still be issued and only the physical pressing\n  of ``Ctrl+Z`` is ignored.\n* Threadable commands are run with ``PopenThread`` and threadable \n  aliases are run with ``ProcProxyThread``.\n\nWhen False:\n\n* Xonsh may not be able to capture stdin, stdout, and stderr streams \n  unless explicitly asked to do so.\n* Stopping the thread with ``Ctrl+Z`` yields to job control.\n* Threadable commands are run with ``Popen`` and threadable \n  alias are run with ``ProcProxy``.\n\nThe desired effect is often up to the command, user, or use case.\n\nNone values are for internal use only and are used to turn off threading when loading xonshrc files. This is done because Bash was automatically placing new xonsh instances in the background at startup when threadable subprocs were used. Please see https://github.com/xonsh/xonsh/pull/3705 for more information.\n', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
UPDATE_OS_ENVIRON = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='If True ``os_environ`` will always be updated when the xonsh environment changes. The environment can be reset to the default value by calling ``__xonsh__.env.undo_replace_env()``', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XDG_CONFIG_HOME = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='/home/travis/.config', doc='Open desktop standard configuration home dir. This is the same default as used in the standard.', is_configurable=False, doc_default='``~/.config``', can_store_as_str=False, pattern=None)
XDG_DATA_HOME = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='/home/travis/.local/share', doc='Open desktop standard data home dir. This is the same default as used in the standard.', is_configurable=True, doc_default='``~/.local/share``', can_store_as_str=False, pattern=None)
XONSHRC = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=<function default_xonshrc>, doc='A list of the locations of run control files, if they exist.  User defined run control file will supersede values set in system-wide control file if there is a naming collision. $THREAD_SUBPROCS=None when reading in run control files.', is_configurable=True, doc_default="On Linux & Mac OSX: ``['/etc/xonshrc', '~/.config/xonsh/rc.xsh', '~/.xonshrc']``\n\nOn Windows: ``['%ALLUSERSPROFILE%\\\\xonsh\\\\xonshrc', '~/.config/xonsh/rc.xsh', '~/.xonshrc']``", can_store_as_str=False, pattern=None)
XONSH_APPEND_NEWLINE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=<function xonsh_append_newline>, doc='Append new line when a partial line is preserved in output.', is_configurable=True, doc_default='``$XONSH_INTERACTIVE``', can_store_as_str=False, pattern=None)
XONSH_CACHE_EVERYTHING = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Controls whether all code (including code entered at the interactive prompt) will be cached.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_CACHE_SCRIPTS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Controls whether the code for scripts run from xonsh will be cached (``True``) or re-compiled each time (``False``).', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_COLOR_STYLE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='default', doc='Sets the color style for xonsh colors. This is a style name, not a color map. Run ``xonfig styles`` to see the available styles.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_CONFIG_DIR = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<function xonsh_config_dir>, doc='This is the location where xonsh configuration information is stored.', is_configurable=False, doc_default='``$XDG_CONFIG_HOME/xonsh``', can_store_as_str=False, pattern=None)
XONSH_DATA_DIR = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<function xonsh_data_dir>, doc='This is the location where xonsh data files are stored, such as history.', is_configurable=True, doc_default='``$XDG_DATA_HOME/xonsh``', can_store_as_str=False, pattern=None)
XONSH_DATETIME_FORMAT = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='%Y-%m-%d %H:%M', doc='The format that is used for ``datetime.strptime()`` in various places, i.e the history timestamp option.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_DEBUG = Var(validate=<function always_false>, convert=<function to_debug>, detype=<function bool_or_int_to_str>, default=0, doc='Sets the xonsh debugging level. This may be an integer or a boolean. Setting this variable prior to stating xonsh to ``1`` or ``True`` will suppress amalgamated imports. Setting it to ``2`` will get some basic information like input transformation, command replacement. With ``3`` or a higher number will make more debugging information presented, like PLY parsing messages.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_ENCODING = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='utf-8', doc='This is the encoding that xonsh should use for subprocess operations.', is_configurable=True, doc_default='``sys.getdefaultencoding()``', can_store_as_str=False, pattern=None)
XONSH_ENCODING_ERRORS = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='surrogateescape', doc="The flag for how to handle encoding errors should they happen. Any string flag that has been previously registered with Python is allowed. See the 'Python codecs documentation' (https://docs.python.org/3/library/codecs.html#error-handlers) for more information and available options.", is_configurable=True, doc_default='``surrogateescape``', can_store_as_str=False, pattern=None)
XONSH_INTERACTIVE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='``True`` if xonsh is running interactively, and ``False`` otherwise.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_LOGIN = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='``True`` if xonsh is running as a login shell, and ``False`` otherwise.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_PROC_FREQUENCY = Var(validate=<function is_float>, convert=<class 'float'>, detype=<class 'str'>, default=0.0001, doc='The process frequency is the time that xonsh process threads sleep for while running command pipelines. The value has units of seconds [s].', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_SHOW_TRACEBACK = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Controls if a traceback is shown if exceptions occur in the shell. Set to ``True`` to always show traceback or ``False`` to always hide. If undefined then the traceback is hidden but a notice is shown on how to enable the full traceback.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_SOURCE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc="When running a xonsh script, this variable contains the absolute path to the currently executing script's file.", is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_STORE_STDIN = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to store the stdin that is supplied to the ``!()`` and ``![]`` operators.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_STORE_STDOUT = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to store the ``stdout`` and ``stderr`` streams in the history files.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_STYLE_OVERRIDES = Var(validate=<function is_str_str_dict>, convert=<function to_str_str_dict>, detype=<function dict_to_str>, default={}, doc="A dictionary containing custom prompt_toolkit/pygments style definitions.\nThe following style definitions are supported:\n\n    - ``pygments.token.Token`` - ``$XONSH_STYLE_OVERRIDES[Token.Keyword] = '#ff0000'``\n    - pygments token name (string) - ``$XONSH_STYLE_OVERRIDES['Token.Keyword'] = '#ff0000'``\n    - ptk style name (string) - ``$XONSH_STYLE_OVERRIDES['pygments.keyword'] = '#ff0000'``\n\n(The rules above are all have the same effect.)", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_TRACEBACK_LOGFILE = Var(validate=<function is_logfile_opt>, convert=<function to_logfile_opt>, detype=<function logfile_opt_to_str>, default=None, doc='Specifies a file to store the traceback log to, regardless of whether ``XONSH_SHOW_TRACEBACK`` has been set. Its value must be a writable file or None / the empty string if traceback logging is not desired. Logging to a file is not enabled by default.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_TRACE_SUBPROC = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Set to ``True`` to show arguments list of every executed subprocess command.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
class xonsh.environ.InterpreterSetting[source]

Interpreter Behavior

classmethod get_doc()
classmethod get_group_description()str
classmethod get_group_title()str
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]]
DOTGLOB = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Globbing files with "*" or "**" will also match dotfiles, or those \'hidden\' files whose names begin with a literal \'.\'. Such files are filtered out by default.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
EXPAND_ENV_VARS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Toggles whether environment variables are expanded inside of strings in subprocess mode.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
FOREIGN_ALIASES_OVERRIDE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not foreign aliases should override xonsh aliases with the same name. Note that setting of this must happen in the environment that xonsh was started from. It cannot be set in the ``.xonshrc`` as loading of foreign aliases happens before``.xonshrc`` is parsed', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
FOREIGN_ALIASES_SUPPRESS_SKIP_MESSAGE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not foreign aliases should suppress the message that informs the user when a foreign alias has been skipped because it already exists in xonsh.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
GLOB_SORTED = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Toggles whether globbing results are manually sorted. If ``False``, the results are returned in arbitrary order.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
class xonsh.environ.LsColors(ini_dict: Optional[dict] = None)[source]

Helps convert to/from $LS_COLORS format, respecting the xonsh color style. This accepts the same inputs as dict(). The special value target is replaced by no color, but sets a flag for cognizant application (see is_target()).

clear()None.  Remove all items from D.
classmethod convert(x)[source]

Converts an object to LsColors, if needed.

detype()[source]

De-types the instance, allowing it to be exported to the environment.

classmethod fromdircolors(filename=None)[source]

Constructs an LsColors instance by running dircolors. If a filename is provided, it is passed down to the dircolors command.

classmethod fromstring(s)[source]

Creates a new instance of the LsColors class from a colon-separated string of dircolor-valid keys to ANSI color escape sequences.

get(k[, d])D[k] if k in D, else d.  d defaults to None.
is_target(key)bool[source]

Return True if key is ‘target’

items()a set-like object providing a view on D’s items
keys()a set-like object providing a view on D’s keys
pop(k[, d])v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()(k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d])D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F)None.  Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values()an object providing a view on D’s values
default_settings = {'*.7z': ('BOLD_RED',), '*.Z': ('BOLD_RED',), '*.aac': ('CYAN',), '*.ace': ('BOLD_RED',), '*.alz': ('BOLD_RED',), '*.arc': ('BOLD_RED',), '*.arj': ('BOLD_RED',), '*.asf': ('BOLD_PURPLE',), '*.au': ('CYAN',), '*.avi': ('BOLD_PURPLE',), '*.bmp': ('BOLD_PURPLE',), '*.bz': ('BOLD_RED',), '*.bz2': ('BOLD_RED',), '*.cab': ('BOLD_RED',), '*.cgm': ('BOLD_PURPLE',), '*.cpio': ('BOLD_RED',), '*.deb': ('BOLD_RED',), '*.dl': ('BOLD_PURPLE',), '*.dwm': ('BOLD_RED',), '*.dz': ('BOLD_RED',), '*.ear': ('BOLD_RED',), '*.emf': ('BOLD_PURPLE',), '*.esd': ('BOLD_RED',), '*.flac': ('CYAN',), '*.flc': ('BOLD_PURPLE',), '*.fli': ('BOLD_PURPLE',), '*.flv': ('BOLD_PURPLE',), '*.gif': ('BOLD_PURPLE',), '*.gl': ('BOLD_PURPLE',), '*.gz': ('BOLD_RED',), '*.jar': ('BOLD_RED',), '*.jpeg': ('BOLD_PURPLE',), '*.jpg': ('BOLD_PURPLE',), '*.lha': ('BOLD_RED',), '*.lrz': ('BOLD_RED',), '*.lz': ('BOLD_RED',), '*.lz4': ('BOLD_RED',), '*.lzh': ('BOLD_RED',), '*.lzma': ('BOLD_RED',), '*.lzo': ('BOLD_RED',), '*.m2v': ('BOLD_PURPLE',), '*.m4a': ('CYAN',), '*.m4v': ('BOLD_PURPLE',), '*.mid': ('CYAN',), '*.midi': ('CYAN',), '*.mjpeg': ('BOLD_PURPLE',), '*.mjpg': ('BOLD_PURPLE',), '*.mka': ('CYAN',), '*.mkv': ('BOLD_PURPLE',), '*.mng': ('BOLD_PURPLE',), '*.mov': ('BOLD_PURPLE',), '*.mp3': ('CYAN',), '*.mp4': ('BOLD_PURPLE',), '*.mp4v': ('BOLD_PURPLE',), '*.mpc': ('CYAN',), '*.mpeg': ('BOLD_PURPLE',), '*.mpg': ('BOLD_PURPLE',), '*.nuv': ('BOLD_PURPLE',), '*.oga': ('CYAN',), '*.ogg': ('CYAN',), '*.ogm': ('BOLD_PURPLE',), '*.ogv': ('BOLD_PURPLE',), '*.ogx': ('BOLD_PURPLE',), '*.opus': ('CYAN',), '*.pbm': ('BOLD_PURPLE',), '*.pcx': ('BOLD_PURPLE',), '*.pgm': ('BOLD_PURPLE',), '*.png': ('BOLD_PURPLE',), '*.ppm': ('BOLD_PURPLE',), '*.qt': ('BOLD_PURPLE',), '*.ra': ('CYAN',), '*.rar': ('BOLD_RED',), '*.rm': ('BOLD_PURPLE',), '*.rmvb': ('BOLD_PURPLE',), '*.rpm': ('BOLD_RED',), '*.rz': ('BOLD_RED',), '*.sar': ('BOLD_RED',), '*.spx': ('CYAN',), '*.svg': ('BOLD_PURPLE',), '*.svgz': ('BOLD_PURPLE',), '*.swm': ('BOLD_RED',), '*.t7z': ('BOLD_RED',), '*.tar': ('BOLD_RED',), '*.taz': ('BOLD_RED',), '*.tbz': ('BOLD_RED',), '*.tbz2': ('BOLD_RED',), '*.tga': ('BOLD_PURPLE',), '*.tgz': ('BOLD_RED',), '*.tif': ('BOLD_PURPLE',), '*.tiff': ('BOLD_PURPLE',), '*.tlz': ('BOLD_RED',), '*.txz': ('BOLD_RED',), '*.tz': ('BOLD_RED',), '*.tzo': ('BOLD_RED',), '*.tzst': ('BOLD_RED',), '*.vob': ('BOLD_PURPLE',), '*.war': ('BOLD_RED',), '*.wav': ('CYAN',), '*.webm': ('BOLD_PURPLE',), '*.wim': ('BOLD_RED',), '*.wmv': ('BOLD_PURPLE',), '*.xbm': ('BOLD_PURPLE',), '*.xcf': ('BOLD_PURPLE',), '*.xpm': ('BOLD_PURPLE',), '*.xspf': ('CYAN',), '*.xwd': ('BOLD_PURPLE',), '*.xz': ('BOLD_RED',), '*.yuv': ('BOLD_PURPLE',), '*.z': ('BOLD_RED',), '*.zip': ('BOLD_RED',), '*.zoo': ('BOLD_RED',), '*.zst': ('BOLD_RED',), 'bd': ('BACKGROUND_BLACK', 'YELLOW'), 'ca': ('BLACK', 'BACKGROUND_RED'), 'cd': ('BACKGROUND_BLACK', 'YELLOW'), 'di': ('BOLD_BLUE',), 'do': ('BOLD_PURPLE',), 'ex': ('BOLD_GREEN',), 'fi': ('RESET',), 'ln': ('BOLD_CYAN',), 'mh': ('RESET',), 'mi': ('RESET',), 'or': ('BACKGROUND_BLACK', 'RED'), 'ow': ('BLUE', 'BACKGROUND_GREEN'), 'pi': ('BACKGROUND_BLACK', 'YELLOW'), 'rs': ('RESET',), 'sg': ('BLACK', 'BACKGROUND_YELLOW'), 'so': ('BOLD_PURPLE',), 'st': ('WHITE', 'BACKGROUND_BLUE'), 'su': ('WHITE', 'BACKGROUND_RED'), 'tw': ('BLACK', 'BACKGROUND_GREEN')}
property style

The ANSI color style for the current XONSH_COLOR_STYLE

property style_name

Current XONSH_COLOR_STYLE value

target_color = ('RESET',)
target_value = 'target'
class xonsh.environ.PTKCompletionSetting[source]

Prompt Toolkit tab-completion

classmethod get_doc()
classmethod get_group_description()str
classmethod get_group_title()str
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]]
BASH_COMPLETIONS = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=('/usr/share/bash-completion/bash_completion',), doc='This is a list (or tuple) of strings that specifies where the ``bash_completion`` script may be found. The first valid path will be used. For better performance, bash-completion v2.x is recommended since it lazy-loads individual completion scripts. For both bash-completion v1.x and v2.x, paths of individual completion scripts (like ``.../completes/ssh``) do not need to be included here. The default values are platform dependent, but sane. To specify an alternate list, do so in the run control file.', is_configurable=True, doc_default="Normally this is:\n\n    ``('/usr/share/bash-completion/bash_completion', )``\n\nBut, on Mac it is:\n\n    ``('/usr/local/share/bash-completion/bash_completion', '/usr/local/etc/bash_completion')``\n\nOther OS-specific defaults may be added in the future.", can_store_as_str=False, pattern=None)
CASE_SENSITIVE_COMPLETIONS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=<xonsh.lazyasd.LazyBool object>, doc='Sets whether completions should be case sensitive or case insensitive.', is_configurable=True, doc_default='True on Linux, False otherwise.', can_store_as_str=False, pattern=None)
COMPLETIONS_BRACKETS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag to enable/disable inclusion of square brackets and parentheses in Python attribute completions.', is_configurable=True, doc_default='True', can_store_as_str=False, pattern=None)
COMPLETIONS_CONFIRM = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='While tab-completions menu is displayed, press <Enter> to confirm completion instead of running command. This only affects the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COMPLETIONS_DISPLAY = Var(validate=<function is_completions_display_value>, convert=<function to_completions_display_value>, detype=<class 'str'>, default='multi', doc="Configure if and how Python completions are displayed by the ``prompt_toolkit`` shell.\n\nThis option does not affect Bash completions, auto-suggestions, etc.\n\nChanging it at runtime will take immediate effect, so you can quickly disable and enable completions during shell sessions.\n\n- If ``$COMPLETIONS_DISPLAY`` is ``none`` or ``false``, do not display those completions.\n- If ``$COMPLETIONS_DISPLAY`` is ``single``, display completions in a\n  single column while typing.\n- If ``$COMPLETIONS_DISPLAY`` is ``multi`` or ``true``, display completions in multiple columns while typing.\n\n- If ``$COMPLETIONS_DISPLAY`` is ``readline``, display completions\n  will emulate the behavior of readline.\n\nThese option values are not case- or type-sensitive, so e.g. writing ``$COMPLETIONS_DISPLAY = None`` and ``$COMPLETIONS_DISPLAY = 'none'`` are equivalent. Only usable with ``$SHELL_TYPE=prompt_toolkit``", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COMPLETIONS_MENU_ROWS = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=5, doc='Number of rows to reserve for tab-completions menu if ``$COMPLETIONS_DISPLAY`` is ``single`` or ``multi``. This only affects the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COMPLETION_IN_THREAD = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='When generating the completions takes time, it’s better to do this in a background thread. When this is True, background threads is used for completion.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COMPLETION_MODE = Var(validate=<function is_completion_mode>, convert=<function to_completion_mode>, detype=<class 'str'>, default='default', doc="Mode of tab completion in prompt-toolkit shell (only).\n\n'default', the default, selects the common prefix of completions on first TAB,\nthen cycles through all completions.\n'menu-complete' selects the first whole completion on the first TAB, \nthen cycles through the remaining completions, then the common prefix.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COMPLETION_QUERY_LIMIT = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=100, doc='The number of completions to display before the user is asked for confirmation.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
FUZZY_PATH_COMPLETION = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc="Toggles 'fuzzy' matching of paths for tab completion, which is only used as a fallback if no other completions succeed but can be used as a way to adjust for typographical errors. If ``True``, then, e.g., ``xonhs`` will match ``xonsh``.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUBSEQUENCE_PATH_COMPLETION = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Toggles subsequence matching of paths for tab completion. If ``True``, then, e.g., ``~/u/ro`` can match ``~/lou/carcolh``.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
UPDATE_COMPLETIONS_ON_KEYPRESS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Completions display is evaluated and presented whenever a key is pressed. This avoids the need to press TAB, except to cycle through the possibilities. This currently only affects the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
class xonsh.environ.PTKSetting[source]

Prompt Toolkit shell Only usable with $SHELL_TYPE=prompt_toolkit.

classmethod get_doc()
classmethod get_group_description()str
classmethod get_group_title()str
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]]
AUTO_SUGGEST = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Enable automatic command suggestions based on history, like in the fish shell.\n\nPressing the right arrow key inserts the currently displayed suggestion. ', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
AUTO_SUGGEST_IN_COMPLETIONS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Places the auto-suggest result as the first option in the completions. This enables you to tab complete the auto-suggestion.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
BOTTOM_TOOLBAR = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='Template string for the bottom toolbar. This may be parametrized in the same way as the ``$PROMPT`` variable. Currently, this is only available in the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COLOR_INPUT = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag for syntax highlighting interactive input.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COLOR_RESULTS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag for syntax highlighting return values.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
DYNAMIC_CWD_ELISION_CHAR = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc="The string used to show a shortened directory in a shortened cwd, e.g. ``'…'``.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
DYNAMIC_CWD_WIDTH = Var(validate=<function is_dynamic_cwd_width>, convert=<function to_dynamic_cwd_tuple>, detype=<function dynamic_cwd_tuple_to_str>, default=(inf, 'c'), doc='Maximum length in number of characters or as a percentage for the ``cwd`` prompt variable. For example, "20" is a twenty character width and "10%" is ten percent of the number of columns available.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
HISTCONTROL = Var(validate=<function is_string_set>, convert=<function csv_to_set>, detype=<function set_to_csv>, default=set(), doc='A set of strings (comma-separated list in string form) of options that determine what commands are saved to the history list. By default all commands are saved. The option ``ignoredups`` will not save the command if it matches the previous command. The option ``ignoreerr`` will cause any commands that fail (i.e. return non-zero exit status) to not be added to the history list. The option ``erasedups`` will remove all previous commands that matches and updates the frequency. Note: ``erasedups`` is supported only in sqlite backend).', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=True, pattern=None)
IGNOREEOF = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Prevents Ctrl-D from exiting the shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
INDENT = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='    ', doc='Indentation string for multiline input', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LS_COLORS = Var(validate=<function is_lscolors>, convert=<bound method LsColors.convert of <class 'xonsh.environ.LsColors'>>, detype=<function detype>, default=<function default_lscolors>, doc="Color settings for ``ls`` command line utility and, with ``$SHELL_TYPE='prompt_toolkit'``, file arguments in subprocess mode.", is_configurable=True, doc_default='``*.7z=1;0;31:*.Z=1;0;31:*.aac=0;36:*.ace=1;0;31:*.alz=1;0;31:*.arc=1;0;31:*.arj=1;0;31:*.asf=1;0;35:*.au=0;36:*.avi=1;0;35:*.bmp=1;0;35:*.bz=1;0;31:*.bz2=1;0;31:*.cab=1;0;31:*.cgm=1;0;35:*.cpio=1;0;31:*.deb=1;0;31:*.dl=1;0;35:*.dwm=1;0;31:*.dz=1;0;31:*.ear=1;0;31:*.emf=1;0;35:*.esd=1;0;31:*.flac=0;36:*.flc=1;0;35:*.fli=1;0;35:*.flv=1;0;35:*.gif=1;0;35:*.gl=1;0;35:*.gz=1;0;31:*.jar=1;0;31:*.jpeg=1;0;35:*.jpg=1;0;35:*.lha=1;0;31:*.lrz=1;0;31:*.lz=1;0;31:*.lz4=1;0;31:*.lzh=1;0;31:*.lzma=1;0;31:*.lzo=1;0;31:*.m2v=1;0;35:*.m4a=0;36:*.m4v=1;0;35:*.mid=0;36:*.midi=0;36:*.mjpeg=1;0;35:*.mjpg=1;0;35:*.mka=0;36:*.mkv=1;0;35:*.mng=1;0;35:*.mov=1;0;35:*.mp3=0;36:*.mp4=1;0;35:*.mp4v=1;0;35:*.mpc=0;36:*.mpeg=1;0;35:*.mpg=1;0;35:*.nuv=1;0;35:*.oga=0;36:*.ogg=0;36:*.ogm=1;0;35:*.ogv=1;0;35:*.ogx=1;0;35:*.opus=0;36:*.pbm=1;0;35:*.pcx=1;0;35:*.pgm=1;0;35:*.png=1;0;35:*.ppm=1;0;35:*.qt=1;0;35:*.ra=0;36:*.rar=1;0;31:*.rm=1;0;35:*.rmvb=1;0;35:*.rpm=1;0;31:*.rz=1;0;31:*.sar=1;0;31:*.spx=0;36:*.svg=1;0;35:*.svgz=1;0;35:*.swm=1;0;31:*.t7z=1;0;31:*.tar=1;0;31:*.taz=1;0;31:*.tbz=1;0;31:*.tbz2=1;0;31:*.tga=1;0;35:*.tgz=1;0;31:*.tif=1;0;35:*.tiff=1;0;35:*.tlz=1;0;31:*.txz=1;0;31:*.tz=1;0;31:*.tzo=1;0;31:*.tzst=1;0;31:*.vob=1;0;35:*.war=1;0;31:*.wav=0;36:*.webm=1;0;35:*.wim=1;0;31:*.wmv=1;0;35:*.xbm=1;0;35:*.xcf=1;0;35:*.xpm=1;0;35:*.xspf=0;36:*.xwd=1;0;35:*.xz=1;0;31:*.yuv=1;0;35:*.z=1;0;31:*.zip=1;0;31:*.zoo=1;0;31:*.zst=1;0;31:bd=40;0;33:ca=0;30;41:cd=40;0;33:di=1;0;34:do=1;0;35:ex=1;0;32:ln=1;0;36:mh=0:mi=0:or=40;0;31:ow=0;34;42:pi=40;0;33:rs=0:sg=0;30;43:so=1;0;35:st=0;37;44:su=0;37;41:tw=0;30;42``', can_store_as_str=False, pattern=None)
MOUSE_SUPPORT = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Enable mouse support in the ``prompt_toolkit`` shell. This allows clicking for positioning the cursor or selecting a completion. In some terminals however, this disables the ability to scroll back through the history of the terminal. Only usable with ``$SHELL_TYPE=prompt_toolkit``', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
MULTILINE_PROMPT = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='.', doc='Prompt text for 2nd+ lines of input, may be str or function which returns a str.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PRETTY_PRINT_RESULTS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag for "pretty printing" return values.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PROMPT = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='{env_name}{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch: {}}{RESET} {BOLD_BLUE}{prompt_end}{RESET} ', doc="The prompt text. May contain keyword arguments which are auto-formatted, see 'Customizing the Prompt' at http://xon.sh/tutorial.html#customizing-the-prompt. This value is never inherited from parent processes.", is_configurable=True, doc_default='``xonsh.environ.DEFAULT_PROMPT``', can_store_as_str=False, pattern=None)
PROMPT_FIELDS = Var(validate=<function always_true>, convert=None, detype=None, default={'user': 'travis', 'prompt_end': '$', 'hostname': 'travis-job-695aad1c-b6c6-4b99-8627-43884c1722cf', 'cwd': <function _dynamically_collapsed_pwd>, 'cwd_dir': <function PROMPT_FIELDS.<locals>.<lambda>>, 'cwd_base': <function PROMPT_FIELDS.<locals>.<lambda>>, 'short_cwd': <function _collapsed_pwd>, 'curr_branch': <function current_branch>, 'branch_color': <function branch_color>, 'branch_bg_color': <function branch_bg_color>, 'current_job': <function _current_job>, 'env_name': <function env_name>, 'env_prefix': '(', 'env_postfix': ') ', 'vte_new_tab_cwd': <function vte_new_tab_cwd>, 'gitstatus': <function gitstatus_prompt>, 'time_format': '%H:%M:%S', 'localtime': <function _localtime>}, doc="Dictionary containing variables to be used when formatting $PROMPT and $TITLE. See 'Customizing the Prompt' http://xon.sh/tutorial.html#customizing-the-prompt", is_configurable=False, doc_default='``xonsh.prompt.PROMPT_FIELDS``', can_store_as_str=False, pattern=None)
PROMPT_REFRESH_INTERVAL = Var(validate=<function is_float>, convert=<class 'float'>, detype=<class 'str'>, default=0.0, doc='Interval (in seconds) to evaluate and update ``$PROMPT``, ``$RIGHT_PROMPT`` and ``$BOTTOM_TOOLBAR``. The default is zero (no update). NOTE: ``$UPDATE_PROMPT_ON_KEYPRESS`` must be set to ``True`` for this variable to take effect.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PROMPT_TOKENS_FORMATTER = Var(validate=<built-in function callable>, convert=None, detype=None, default=<function prompt_tokens_formatter_default>, doc='Final processor that receives all tokens in the prompt template. It gives option to format the prompt with different prefix based on other tokens values. Highly useful for implementing something like powerline theme.', is_configurable=True, doc_default='``xonsh.prompt.base.prompt_tokens_formatter_default``', can_store_as_str=False, pattern=None)
PROMPT_TOOLKIT_COLOR_DEPTH = Var(validate=<function always_false>, convert=<function ptk2_color_depth_setter>, detype=<function ensure_string>, default='', doc='The color depth used by prompt toolkit 2. Possible values are: ``DEPTH_1_BIT``, ``DEPTH_4_BIT``, ``DEPTH_8_BIT``, ``DEPTH_24_BIT`` colors. Default is an empty string which means that prompt toolkit decide.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PTK_STYLE_OVERRIDES = Var(validate=<function is_str_str_dict>, convert=<function to_str_str_dict>, detype=<function dict_to_str>, default={}, doc='A dictionary containing custom prompt_toolkit style definitions. (deprecated)', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
RIGHT_PROMPT = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='Template string for right-aligned text at the prompt. This may be parametrized in the same way as the ``$PROMPT`` variable. Currently, this is only available in the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SHELL_TYPE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='best', doc="Which shell is used. Currently two base shell types are supported:\n\n    - ``readline`` that is backed by Python's readline module\n    - ``prompt_toolkit`` that uses external library of the same name\n    - ``random`` selects a random shell from the above on startup\n    - ``best`` selects the most feature-rich shell available on the\n       user's system\n\nTo use the ``prompt_toolkit`` shell you need to have the `prompt_toolkit <https://github.com/jonathanslenders/python-prompt-toolkit>`_ library installed. To specify which shell should be used, do so in the run control file.", is_configurable=True, doc_default='``best``', can_store_as_str=False, pattern=None)
SUGGEST_COMMANDS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='When a user types an invalid command, xonsh will try to offer suggestions of similar valid commands if this is True.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUGGEST_MAX_NUM = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=5, doc='xonsh will show at most this many suggestions in response to an invalid command. If negative, there is no limit to how many suggestions are shown.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUGGEST_THRESHOLD = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=3, doc='An error threshold. If the Levenshtein distance between the entered command and a valid command is less than this value, the valid command will be offered as a suggestion.  Also used for "fuzzy" tab completion of paths.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUPPRESS_BRANCH_TIMEOUT_MESSAGE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to suppress branch timeout warning messages when getting {gitstatus} PROMPT_FIELD.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
TITLE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='{current_job:{} | }{user}@{hostname}: {cwd} | xonsh', doc="The title text for the window in which xonsh is running. Formatted in the same manner as ``$PROMPT``, see 'Customizing the Prompt' http://xon.sh/tutorial.html#customizing-the-prompt.", is_configurable=True, doc_default='``xonsh.environ.DEFAULT_TITLE``', can_store_as_str=False, pattern=None)
UPDATE_PROMPT_ON_KEYPRESS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Disables caching the prompt between commands, so that it would be reevaluated on each keypress. Disabled by default because of the incurred performance penalty.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VC_BRANCH_TIMEOUT = Var(validate=<function is_float>, convert=<class 'float'>, detype=<class 'str'>, default=0.1, doc='The timeout (in seconds) for version control branch computations. This is a timeout per subprocess call, so the total time to compute will be larger than this in many cases.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VC_GIT_INCLUDE_UNTRACKED = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc="Whether or not untracked file changes should count as 'dirty' in git.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VC_HG_SHOW_BRANCH = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Whether or not to show the Mercurial branch in the prompt.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VIRTUAL_ENV = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<xonsh.tools.DefaultNotGivenType object>, doc='Path to the currently active Python environment.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VI_MODE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Flag to enable ``vi_mode`` in the ``prompt_toolkit`` shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_AUTOPAIR = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether Xonsh will auto-insert matching parentheses, brackets, and quotes. Only available under the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_GITSTATUS_ = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='Symbols for gitstatus prompt. Default values are: \n\n* ``XONSH_GITSTATUS_HASH``: ``:``\n* ``XONSH_GITSTATUS_BRANCH``: ``{CYAN}``\n* ``XONSH_GITSTATUS_OPERATION``: ``{CYAN}``\n* ``XONSH_GITSTATUS_STAGED``: ``{RED}●``\n* ``XONSH_GITSTATUS_CONFLICTS``: ``{RED}×``\n* ``XONSH_GITSTATUS_CHANGED``: ``{BLUE}+``\n* ``XONSH_GITSTATUS_UNTRACKED``: ``…``\n* ``XONSH_GITSTATUS_STASHED``: ``⚑``\n* ``XONSH_GITSTATUS_CLEAN``: ``{BOLD_GREEN}✓``\n* ``XONSH_GITSTATUS_AHEAD``: ``↑·``\n* ``XONSH_GITSTATUS_BEHIND``: ``↓·``\n', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern='XONSH_GITSTATUS_*')
XONSH_HISTORY_BACKEND = Var(validate=<function is_history_backend>, convert=<function to_itself>, detype=<function ensure_string>, default='json', doc="Set which history backend to use. Options are: 'json', 'sqlite', and 'dummy'. The default is 'json'. ``XONSH_HISTORY_BACKEND`` also accepts a class type that inherits from ``xonsh.history.base.History``, or its instance.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_HISTORY_FILE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='/home/travis/.xonsh_history.json', doc='Location of history file (deprecated).', is_configurable=False, doc_default='``~/.xonsh_history``', can_store_as_str=False, pattern=None)
XONSH_HISTORY_MATCH_ANYWHERE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='When searching history from a partial string (by pressing up arrow), match command history anywhere in a given line (not just the start)', is_configurable=True, doc_default='False', can_store_as_str=False, pattern=None)
XONSH_HISTORY_SIZE = Var(validate=<function is_history_tuple>, convert=<function to_history_tuple>, detype=<function history_tuple_to_str>, default=(8128, 'commands'), doc="Value and units tuple that sets the size of history after garbage collection. Canonical units are:\n\n- ``commands`` for the number of past commands executed,\n- ``files`` for the number of history files to keep,\n- ``s`` for the number of seconds in the past that are allowed, and\n- ``b`` for the number of bytes that history may consume.\n\nCommon abbreviations, such as '6 months' or '1 GB' are also allowed.", is_configurable=True, doc_default="``(8128, 'commands')`` or ``'8128 commands'``", can_store_as_str=False, pattern=None)
XONSH_STDERR_POSTFIX = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='A format string, using the same keys and colors as ``$PROMPT``, that is appended whenever stderr is displayed. This may be used in conjunction with ``$XONSH_STDERR_PREFIX`` to start the block.For example, to have stderr appear on a red background, the prefix & postfix pair would be "{BACKGROUND_RED}" & "{RESET}".', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_STDERR_PREFIX = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='A format string, using the same keys and colors as ``$PROMPT``, that is prepended whenever stderr is displayed. This may be used in conjunction with ``$XONSH_STDERR_POSTFIX`` to close out the block.For example, to have stderr appear on a red background, the prefix & postfix pair would be "{BACKGROUND_RED}" & "{RESET}".', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
class xonsh.environ.PromptSetting[source]

Interactive Prompt

classmethod get_doc()
classmethod get_group_description()str
classmethod get_group_title()str
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]]
BOTTOM_TOOLBAR = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='Template string for the bottom toolbar. This may be parametrized in the same way as the ``$PROMPT`` variable. Currently, this is only available in the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COLOR_INPUT = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag for syntax highlighting interactive input.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COLOR_RESULTS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag for syntax highlighting return values.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
DYNAMIC_CWD_ELISION_CHAR = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc="The string used to show a shortened directory in a shortened cwd, e.g. ``'…'``.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
DYNAMIC_CWD_WIDTH = Var(validate=<function is_dynamic_cwd_width>, convert=<function to_dynamic_cwd_tuple>, detype=<function dynamic_cwd_tuple_to_str>, default=(inf, 'c'), doc='Maximum length in number of characters or as a percentage for the ``cwd`` prompt variable. For example, "20" is a twenty character width and "10%" is ten percent of the number of columns available.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
HISTCONTROL = Var(validate=<function is_string_set>, convert=<function csv_to_set>, detype=<function set_to_csv>, default=set(), doc='A set of strings (comma-separated list in string form) of options that determine what commands are saved to the history list. By default all commands are saved. The option ``ignoredups`` will not save the command if it matches the previous command. The option ``ignoreerr`` will cause any commands that fail (i.e. return non-zero exit status) to not be added to the history list. The option ``erasedups`` will remove all previous commands that matches and updates the frequency. Note: ``erasedups`` is supported only in sqlite backend).', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=True, pattern=None)
IGNOREEOF = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Prevents Ctrl-D from exiting the shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
INDENT = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='    ', doc='Indentation string for multiline input', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LS_COLORS = Var(validate=<function is_lscolors>, convert=<bound method LsColors.convert of <class 'xonsh.environ.LsColors'>>, detype=<function detype>, default=<function default_lscolors>, doc="Color settings for ``ls`` command line utility and, with ``$SHELL_TYPE='prompt_toolkit'``, file arguments in subprocess mode.", is_configurable=True, doc_default='``*.7z=1;0;31:*.Z=1;0;31:*.aac=0;36:*.ace=1;0;31:*.alz=1;0;31:*.arc=1;0;31:*.arj=1;0;31:*.asf=1;0;35:*.au=0;36:*.avi=1;0;35:*.bmp=1;0;35:*.bz=1;0;31:*.bz2=1;0;31:*.cab=1;0;31:*.cgm=1;0;35:*.cpio=1;0;31:*.deb=1;0;31:*.dl=1;0;35:*.dwm=1;0;31:*.dz=1;0;31:*.ear=1;0;31:*.emf=1;0;35:*.esd=1;0;31:*.flac=0;36:*.flc=1;0;35:*.fli=1;0;35:*.flv=1;0;35:*.gif=1;0;35:*.gl=1;0;35:*.gz=1;0;31:*.jar=1;0;31:*.jpeg=1;0;35:*.jpg=1;0;35:*.lha=1;0;31:*.lrz=1;0;31:*.lz=1;0;31:*.lz4=1;0;31:*.lzh=1;0;31:*.lzma=1;0;31:*.lzo=1;0;31:*.m2v=1;0;35:*.m4a=0;36:*.m4v=1;0;35:*.mid=0;36:*.midi=0;36:*.mjpeg=1;0;35:*.mjpg=1;0;35:*.mka=0;36:*.mkv=1;0;35:*.mng=1;0;35:*.mov=1;0;35:*.mp3=0;36:*.mp4=1;0;35:*.mp4v=1;0;35:*.mpc=0;36:*.mpeg=1;0;35:*.mpg=1;0;35:*.nuv=1;0;35:*.oga=0;36:*.ogg=0;36:*.ogm=1;0;35:*.ogv=1;0;35:*.ogx=1;0;35:*.opus=0;36:*.pbm=1;0;35:*.pcx=1;0;35:*.pgm=1;0;35:*.png=1;0;35:*.ppm=1;0;35:*.qt=1;0;35:*.ra=0;36:*.rar=1;0;31:*.rm=1;0;35:*.rmvb=1;0;35:*.rpm=1;0;31:*.rz=1;0;31:*.sar=1;0;31:*.spx=0;36:*.svg=1;0;35:*.svgz=1;0;35:*.swm=1;0;31:*.t7z=1;0;31:*.tar=1;0;31:*.taz=1;0;31:*.tbz=1;0;31:*.tbz2=1;0;31:*.tga=1;0;35:*.tgz=1;0;31:*.tif=1;0;35:*.tiff=1;0;35:*.tlz=1;0;31:*.txz=1;0;31:*.tz=1;0;31:*.tzo=1;0;31:*.tzst=1;0;31:*.vob=1;0;35:*.war=1;0;31:*.wav=0;36:*.webm=1;0;35:*.wim=1;0;31:*.wmv=1;0;35:*.xbm=1;0;35:*.xcf=1;0;35:*.xpm=1;0;35:*.xspf=0;36:*.xwd=1;0;35:*.xz=1;0;31:*.yuv=1;0;35:*.z=1;0;31:*.zip=1;0;31:*.zoo=1;0;31:*.zst=1;0;31:bd=40;0;33:ca=0;30;41:cd=40;0;33:di=1;0;34:do=1;0;35:ex=1;0;32:ln=1;0;36:mh=0:mi=0:or=40;0;31:ow=0;34;42:pi=40;0;33:rs=0:sg=0;30;43:so=1;0;35:st=0;37;44:su=0;37;41:tw=0;30;42``', can_store_as_str=False, pattern=None)
MULTILINE_PROMPT = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='.', doc='Prompt text for 2nd+ lines of input, may be str or function which returns a str.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PRETTY_PRINT_RESULTS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Flag for "pretty printing" return values.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PROMPT = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='{env_name}{BOLD_GREEN}{user}@{hostname}{BOLD_BLUE} {cwd}{branch_color}{curr_branch: {}}{RESET} {BOLD_BLUE}{prompt_end}{RESET} ', doc="The prompt text. May contain keyword arguments which are auto-formatted, see 'Customizing the Prompt' at http://xon.sh/tutorial.html#customizing-the-prompt. This value is never inherited from parent processes.", is_configurable=True, doc_default='``xonsh.environ.DEFAULT_PROMPT``', can_store_as_str=False, pattern=None)
PROMPT_FIELDS = Var(validate=<function always_true>, convert=None, detype=None, default={'user': 'travis', 'prompt_end': '$', 'hostname': 'travis-job-695aad1c-b6c6-4b99-8627-43884c1722cf', 'cwd': <function _dynamically_collapsed_pwd>, 'cwd_dir': <function PROMPT_FIELDS.<locals>.<lambda>>, 'cwd_base': <function PROMPT_FIELDS.<locals>.<lambda>>, 'short_cwd': <function _collapsed_pwd>, 'curr_branch': <function current_branch>, 'branch_color': <function branch_color>, 'branch_bg_color': <function branch_bg_color>, 'current_job': <function _current_job>, 'env_name': <function env_name>, 'env_prefix': '(', 'env_postfix': ') ', 'vte_new_tab_cwd': <function vte_new_tab_cwd>, 'gitstatus': <function gitstatus_prompt>, 'time_format': '%H:%M:%S', 'localtime': <function _localtime>}, doc="Dictionary containing variables to be used when formatting $PROMPT and $TITLE. See 'Customizing the Prompt' http://xon.sh/tutorial.html#customizing-the-prompt", is_configurable=False, doc_default='``xonsh.prompt.PROMPT_FIELDS``', can_store_as_str=False, pattern=None)
PROMPT_REFRESH_INTERVAL = Var(validate=<function is_float>, convert=<class 'float'>, detype=<class 'str'>, default=0.0, doc='Interval (in seconds) to evaluate and update ``$PROMPT``, ``$RIGHT_PROMPT`` and ``$BOTTOM_TOOLBAR``. The default is zero (no update). NOTE: ``$UPDATE_PROMPT_ON_KEYPRESS`` must be set to ``True`` for this variable to take effect.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PROMPT_TOKENS_FORMATTER = Var(validate=<built-in function callable>, convert=None, detype=None, default=<function prompt_tokens_formatter_default>, doc='Final processor that receives all tokens in the prompt template. It gives option to format the prompt with different prefix based on other tokens values. Highly useful for implementing something like powerline theme.', is_configurable=True, doc_default='``xonsh.prompt.base.prompt_tokens_formatter_default``', can_store_as_str=False, pattern=None)
RIGHT_PROMPT = Var(validate=<function is_string_or_callable>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='Template string for right-aligned text at the prompt. This may be parametrized in the same way as the ``$PROMPT`` variable. Currently, this is only available in the prompt-toolkit shell.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SHELL_TYPE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='best', doc="Which shell is used. Currently two base shell types are supported:\n\n    - ``readline`` that is backed by Python's readline module\n    - ``prompt_toolkit`` that uses external library of the same name\n    - ``random`` selects a random shell from the above on startup\n    - ``best`` selects the most feature-rich shell available on the\n       user's system\n\nTo use the ``prompt_toolkit`` shell you need to have the `prompt_toolkit <https://github.com/jonathanslenders/python-prompt-toolkit>`_ library installed. To specify which shell should be used, do so in the run control file.", is_configurable=True, doc_default='``best``', can_store_as_str=False, pattern=None)
SUGGEST_COMMANDS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='When a user types an invalid command, xonsh will try to offer suggestions of similar valid commands if this is True.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUGGEST_MAX_NUM = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=5, doc='xonsh will show at most this many suggestions in response to an invalid command. If negative, there is no limit to how many suggestions are shown.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUGGEST_THRESHOLD = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=3, doc='An error threshold. If the Levenshtein distance between the entered command and a valid command is less than this value, the valid command will be offered as a suggestion.  Also used for "fuzzy" tab completion of paths.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
SUPPRESS_BRANCH_TIMEOUT_MESSAGE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to suppress branch timeout warning messages when getting {gitstatus} PROMPT_FIELD.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
TITLE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='{current_job:{} | }{user}@{hostname}: {cwd} | xonsh', doc="The title text for the window in which xonsh is running. Formatted in the same manner as ``$PROMPT``, see 'Customizing the Prompt' http://xon.sh/tutorial.html#customizing-the-prompt.", is_configurable=True, doc_default='``xonsh.environ.DEFAULT_TITLE``', can_store_as_str=False, pattern=None)
UPDATE_PROMPT_ON_KEYPRESS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Disables caching the prompt between commands, so that it would be reevaluated on each keypress. Disabled by default because of the incurred performance penalty.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VC_BRANCH_TIMEOUT = Var(validate=<function is_float>, convert=<class 'float'>, detype=<class 'str'>, default=0.1, doc='The timeout (in seconds) for version control branch computations. This is a timeout per subprocess call, so the total time to compute will be larger than this in many cases.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VC_GIT_INCLUDE_UNTRACKED = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc="Whether or not untracked file changes should count as 'dirty' in git.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VC_HG_SHOW_BRANCH = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Whether or not to show the Mercurial branch in the prompt.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
VIRTUAL_ENV = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<xonsh.tools.DefaultNotGivenType object>, doc='Path to the currently active Python environment.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_GITSTATUS_ = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='Symbols for gitstatus prompt. Default values are: \n\n* ``XONSH_GITSTATUS_HASH``: ``:``\n* ``XONSH_GITSTATUS_BRANCH``: ``{CYAN}``\n* ``XONSH_GITSTATUS_OPERATION``: ``{CYAN}``\n* ``XONSH_GITSTATUS_STAGED``: ``{RED}●``\n* ``XONSH_GITSTATUS_CONFLICTS``: ``{RED}×``\n* ``XONSH_GITSTATUS_CHANGED``: ``{BLUE}+``\n* ``XONSH_GITSTATUS_UNTRACKED``: ``…``\n* ``XONSH_GITSTATUS_STASHED``: ``⚑``\n* ``XONSH_GITSTATUS_CLEAN``: ``{BOLD_GREEN}✓``\n* ``XONSH_GITSTATUS_AHEAD``: ``↑·``\n* ``XONSH_GITSTATUS_BEHIND``: ``↓·``\n', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern='XONSH_GITSTATUS_*')
XONSH_HISTORY_BACKEND = Var(validate=<function is_history_backend>, convert=<function to_itself>, detype=<function ensure_string>, default='json', doc="Set which history backend to use. Options are: 'json', 'sqlite', and 'dummy'. The default is 'json'. ``XONSH_HISTORY_BACKEND`` also accepts a class type that inherits from ``xonsh.history.base.History``, or its instance.", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_HISTORY_FILE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='/home/travis/.xonsh_history.json', doc='Location of history file (deprecated).', is_configurable=False, doc_default='``~/.xonsh_history``', can_store_as_str=False, pattern=None)
XONSH_HISTORY_MATCH_ANYWHERE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='When searching history from a partial string (by pressing up arrow), match command history anywhere in a given line (not just the start)', is_configurable=True, doc_default='False', can_store_as_str=False, pattern=None)
XONSH_HISTORY_SIZE = Var(validate=<function is_history_tuple>, convert=<function to_history_tuple>, detype=<function history_tuple_to_str>, default=(8128, 'commands'), doc="Value and units tuple that sets the size of history after garbage collection. Canonical units are:\n\n- ``commands`` for the number of past commands executed,\n- ``files`` for the number of history files to keep,\n- ``s`` for the number of seconds in the past that are allowed, and\n- ``b`` for the number of bytes that history may consume.\n\nCommon abbreviations, such as '6 months' or '1 GB' are also allowed.", is_configurable=True, doc_default="``(8128, 'commands')`` or ``'8128 commands'``", can_store_as_str=False, pattern=None)
XONSH_STDERR_POSTFIX = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='A format string, using the same keys and colors as ``$PROMPT``, that is appended whenever stderr is displayed. This may be used in conjunction with ``$XONSH_STDERR_PREFIX`` to start the block.For example, to have stderr appear on a red background, the prefix & postfix pair would be "{BACKGROUND_RED}" & "{RESET}".', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_STDERR_PREFIX = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc='A format string, using the same keys and colors as ``$PROMPT``, that is prepended whenever stderr is displayed. This may be used in conjunction with ``$XONSH_STDERR_POSTFIX`` to close out the block.For example, to have stderr appear on a red background, the prefix & postfix pair would be "{BACKGROUND_RED}" & "{RESET}".', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
class xonsh.environ.Var(validate: Optional[Callable] = <function always_true>, convert: Optional[Callable] = None, detype: Optional[Callable] = <function ensure_string>, default: Any = <xonsh.tools.DefaultNotGivenType object>, doc: str = '', is_configurable: Union[bool, xonsh.lazyasd.LazyBool] = True, doc_default: Union[str, xonsh.tools.DefaultNotGivenType] = <xonsh.tools.DefaultNotGivenType object>, can_store_as_str: bool = False, pattern: Optional[Union[str, Pattern]] = None)[source]

Named tuples whose elements represent environment variable validation, conversion, detyping; default values; and documentation.

Attributes
validatefunc

Validator function returning a bool; checks that the variable is of the expected type.

convertfunc

Function to convert variable from a string representation to its type.

detypefunc

Function to convert variable from its type to a string representation.

default

Default value for variable. If set to DefaultNotGiven, raise KeyError instead of returning this default value. Used for env vars defined outside of Xonsh.

docstr, optional

The environment variable docstring.

doc_defaultstr, optional

Custom docstring for the default value for complex defaults.

is_configurablebool, optional

Flag for whether the environment variable is configurable or not.

can_store_as_strbool, optional

Flag for whether the environment variable should be stored as a string. This is used when persisting a variable that is not JSON serializable to the config file. For example, sets, frozensets, and potentially other non-trivial data types. default, False.

pattern

a regex pattern to match for the given variable

Create new instance of Var(validate, convert, detype, default, doc, is_configurable, doc_default, can_store_as_str, pattern)

count(value, /)

Return number of occurrences of value.

classmethod for_locale(lcle: str)[source]
get_key(var_name: str)Union[str, Pattern][source]
index(value, start=0, stop=sys.maxsize, /)

Return first index of value.

Raises ValueError if the value is not present.

classmethod no_default(type_str: str, doc: str = '', **kwargs)[source]
classmethod with_default(default: object, doc: str = '', doc_default: Union[str, xonsh.tools.DefaultNotGivenType] = <xonsh.tools.DefaultNotGivenType object>, type_str: str = '', **kwargs)[source]

fill arguments from the value of default

can_store_as_str: bool

Alias for field number 7

convert: Optional[Callable]

Alias for field number 1

default: Any

Alias for field number 3

detype: Optional[Callable]

Alias for field number 2

doc: str

Alias for field number 4

doc_default: Union[str, xonsh.tools.DefaultNotGivenType]

Alias for field number 6

is_configurable: Union[bool, xonsh.lazyasd.LazyBool]

Alias for field number 5

pattern: Optional[Union[str, Pattern]]

Alias for field number 8

validate: Optional[Callable]

Alias for field number 0

class xonsh.environ.WindowsSetting[source]

Windows OS Windows OS specific settings

classmethod get_doc()
classmethod get_group_description()str
classmethod get_group_title()str
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]]
ANSICON = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<xonsh.tools.DefaultNotGivenType object>, doc='This is used on Windows to set the title, if available.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
AUTO_CONTINUE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='If ``True``, automatically resume stopped jobs when they are disowned. When stopped jobs are disowned and this option is ``False``, a warning will print information about how to continue the stopped process.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
COMMANDS_CACHE_SIZE_WARNING = Var(validate=<function is_int>, convert=<class 'int'>, detype=<class 'str'>, default=6000, doc='Number of files on the PATH above which a warning is shown.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
FORCE_POSIX_PATHS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Forces forward slashes (``/``) on Windows systems when using auto completion if set to anything truthy.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
HOSTNAME = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<function GeneralSetting.<lambda>>, doc='Automatically set to the name of the current host.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
HOSTTYPE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<function GeneralSetting.<lambda>>, doc='Automatically set to a string that fully describes the system type on which xonsh is executing.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
INTENSIFY_COLORS_ON_WIN = Var(validate=<function always_false>, convert=<function intensify_colors_on_win_setter>, detype=<function bool_to_str>, default=True, doc='Enhance style colors for readability when using the default terminal (``cmd.exe``) on Windows. Blue colors, which are hard to read, are replaced with cyan. Other colors are generally replaced by their bright counter parts.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LANG = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='C.UTF-8', doc='Fallback locale setting for systems where it matters', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_COLLATE = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_CTYPE = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_MESSAGES = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_MONETARY = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_NUMERIC = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LC_TIME = Var(validate=<function always_false>, convert=<function locale_convert.<locals>.lc_converter>, detype=<function ensure_string>, default='en_US.UTF-8', doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
LOADED_RC_FILES = Var(validate=<function is_bool_seq>, convert=<function csv_to_bool_seq>, detype=<function bool_seq_to_csv>, default=(), doc="Whether or not any of the xonsh run control files were loaded at startup. This is a sequence of bools in Python that is converted to a CSV list in string form, ie ``[True, False]`` becomes ``'True,False'``.", is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
OLDPWD = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='.', doc='Used to represent a previous present working directory.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
PATH = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=('/home/travis/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin', '/usr/bin', '/sbin', '/bin', '/usr/games', '/usr/local/games'), doc='List of strings representing where to look for executables.', is_configurable=True, doc_default="On Windows: it is ``Path`` value of register's ``HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment``. On Mac OSX: ``('/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin')`` On Linux & on Cygwin & on MSYS, when detected that the distro is like arch, the default PATH is ``('/usr/local/sbin', '/usr/local/bin', '/usr/bin', '/usr/bin/site_perl', '/usr/bin/vendor_perl', '/usr/bin/core_perl')`` and otherwise is ``('~/bin', '/usr/local/sbin', '/usr/local/bin', '/usr/sbin','/usr/bin', '/sbin', '/bin', '/usr/games', '/usr/local/games')``", can_store_as_str=False, pattern=None)
PATHEXT = Var(validate=<function is_nonstring_seq_of_strings>, convert=<function pathsep_to_upper_seq>, detype=<function seq_to_upper_pathsep>, default=[], doc='Sequence of extension strings (eg, ``.EXE``) for filtering valid executables by. Each element must be uppercase.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
RAISE_SUBPROC_ERROR = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to raise an error if a subprocess (captured or uncaptured) returns a non-zero exit status, which indicates failure. This is most useful in xonsh scripts or modules where failures should cause an end to execution. This is less useful at a terminal. The error that is raised is a ``subprocess.CalledProcessError``.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
STAR_DIRS = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=<xonsh.tools.DefaultNotGivenType object>, doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=re.compile('\\w*DIRS$'))
STAR_PATH = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=<xonsh.tools.DefaultNotGivenType object>, doc='', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=re.compile('\\w*PATH$'))
TERM = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<xonsh.tools.DefaultNotGivenType object>, doc='TERM is sometimes set by the terminal emulator. This is used (when valid) to determine whether the terminal emulator can support the selected shell, or whether or not to set the title. Users shouldn\'t need to set this themselves. Note that this variable should be set as early as possible in order to ensure it is effective. Here are a few options:\n\n* Set this from the program that launches xonsh. On POSIX systems, \n  this can be performed by using env, e.g. \n  ``/usr/bin/env TERM=xterm-color xonsh`` or similar.\n* From the xonsh command line, namely ``xonsh -DTERM=xterm-color``.\n* In the config file with ``{"env": {"TERM": "xterm-color"}}``.\n* Lastly, in xonshrc with ``$TERM``\n\nIdeally, your terminal emulator will set this correctly but that does not always happen.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
THREAD_SUBPROCS = Var(validate=<function is_bool_or_none>, convert=<function to_bool_or_none>, detype=<function bool_or_none_to_str>, default=True, doc='Whether or not to try to run subrocess mode in a Python thread, when applicable. There are various trade-offs, which normally affects only interactive sessions.\n\nWhen True:\n\n* Xonsh is able capture & store the stdin, stdout, and stderr \n  of threadable subprocesses.\n* However, stopping threaded subprocs with ^Z (i.e. ``SIGTSTP``)\n  is disabled as it causes deadlocked terminals.\n  ``SIGTSTP`` may still be issued and only the physical pressing\n  of ``Ctrl+Z`` is ignored.\n* Threadable commands are run with ``PopenThread`` and threadable \n  aliases are run with ``ProcProxyThread``.\n\nWhen False:\n\n* Xonsh may not be able to capture stdin, stdout, and stderr streams \n  unless explicitly asked to do so.\n* Stopping the thread with ``Ctrl+Z`` yields to job control.\n* Threadable commands are run with ``Popen`` and threadable \n  alias are run with ``ProcProxy``.\n\nThe desired effect is often up to the command, user, or use case.\n\nNone values are for internal use only and are used to turn off threading when loading xonshrc files. This is done because Bash was automatically placing new xonsh instances in the background at startup when threadable subprocs were used. Please see https://github.com/xonsh/xonsh/pull/3705 for more information.\n', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
UPDATE_OS_ENVIRON = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='If True ``os_environ`` will always be updated when the xonsh environment changes. The environment can be reset to the default value by calling ``__xonsh__.env.undo_replace_env()``', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XDG_CONFIG_HOME = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='/home/travis/.config', doc='Open desktop standard configuration home dir. This is the same default as used in the standard.', is_configurable=False, doc_default='``~/.config``', can_store_as_str=False, pattern=None)
XDG_DATA_HOME = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='/home/travis/.local/share', doc='Open desktop standard data home dir. This is the same default as used in the standard.', is_configurable=True, doc_default='``~/.local/share``', can_store_as_str=False, pattern=None)
XONSHRC = Var(validate=<function is_env_path>, convert=<function str_to_env_path>, detype=<function env_path_to_str>, default=<function default_xonshrc>, doc='A list of the locations of run control files, if they exist.  User defined run control file will supersede values set in system-wide control file if there is a naming collision. $THREAD_SUBPROCS=None when reading in run control files.', is_configurable=True, doc_default="On Linux & Mac OSX: ``['/etc/xonshrc', '~/.config/xonsh/rc.xsh', '~/.xonshrc']``\n\nOn Windows: ``['%ALLUSERSPROFILE%\\\\xonsh\\\\xonshrc', '~/.config/xonsh/rc.xsh', '~/.xonshrc']``", can_store_as_str=False, pattern=None)
XONSH_APPEND_NEWLINE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=<function xonsh_append_newline>, doc='Append new line when a partial line is preserved in output.', is_configurable=True, doc_default='``$XONSH_INTERACTIVE``', can_store_as_str=False, pattern=None)
XONSH_CACHE_EVERYTHING = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Controls whether all code (including code entered at the interactive prompt) will be cached.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_CACHE_SCRIPTS = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='Controls whether the code for scripts run from xonsh will be cached (``True``) or re-compiled each time (``False``).', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_COLOR_STYLE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='default', doc='Sets the color style for xonsh colors. This is a style name, not a color map. Run ``xonfig styles`` to see the available styles.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_CONFIG_DIR = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<function xonsh_config_dir>, doc='This is the location where xonsh configuration information is stored.', is_configurable=False, doc_default='``$XDG_CONFIG_HOME/xonsh``', can_store_as_str=False, pattern=None)
XONSH_DATA_DIR = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default=<function xonsh_data_dir>, doc='This is the location where xonsh data files are stored, such as history.', is_configurable=True, doc_default='``$XDG_DATA_HOME/xonsh``', can_store_as_str=False, pattern=None)
XONSH_DATETIME_FORMAT = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='%Y-%m-%d %H:%M', doc='The format that is used for ``datetime.strptime()`` in various places, i.e the history timestamp option.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_DEBUG = Var(validate=<function always_false>, convert=<function to_debug>, detype=<function bool_or_int_to_str>, default=0, doc='Sets the xonsh debugging level. This may be an integer or a boolean. Setting this variable prior to stating xonsh to ``1`` or ``True`` will suppress amalgamated imports. Setting it to ``2`` will get some basic information like input transformation, command replacement. With ``3`` or a higher number will make more debugging information presented, like PLY parsing messages.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_ENCODING = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='utf-8', doc='This is the encoding that xonsh should use for subprocess operations.', is_configurable=True, doc_default='``sys.getdefaultencoding()``', can_store_as_str=False, pattern=None)
XONSH_ENCODING_ERRORS = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='surrogateescape', doc="The flag for how to handle encoding errors should they happen. Any string flag that has been previously registered with Python is allowed. See the 'Python codecs documentation' (https://docs.python.org/3/library/codecs.html#error-handlers) for more information and available options.", is_configurable=True, doc_default='``surrogateescape``', can_store_as_str=False, pattern=None)
XONSH_INTERACTIVE = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=True, doc='``True`` if xonsh is running interactively, and ``False`` otherwise.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_LOGIN = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='``True`` if xonsh is running as a login shell, and ``False`` otherwise.', is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_PROC_FREQUENCY = Var(validate=<function is_float>, convert=<class 'float'>, detype=<class 'str'>, default=0.0001, doc='The process frequency is the time that xonsh process threads sleep for while running command pipelines. The value has units of seconds [s].', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_SHOW_TRACEBACK = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Controls if a traceback is shown if exceptions occur in the shell. Set to ``True`` to always show traceback or ``False`` to always hide. If undefined then the traceback is hidden but a notice is shown on how to enable the full traceback.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_SOURCE = Var(validate=<function is_string>, convert=<function ensure_string>, detype=<function ensure_string>, default='', doc="When running a xonsh script, this variable contains the absolute path to the currently executing script's file.", is_configurable=False, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_STORE_STDIN = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to store the stdin that is supplied to the ``!()`` and ``![]`` operators.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_STORE_STDOUT = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Whether or not to store the ``stdout`` and ``stderr`` streams in the history files.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_STYLE_OVERRIDES = Var(validate=<function is_str_str_dict>, convert=<function to_str_str_dict>, detype=<function dict_to_str>, default={}, doc="A dictionary containing custom prompt_toolkit/pygments style definitions.\nThe following style definitions are supported:\n\n    - ``pygments.token.Token`` - ``$XONSH_STYLE_OVERRIDES[Token.Keyword] = '#ff0000'``\n    - pygments token name (string) - ``$XONSH_STYLE_OVERRIDES['Token.Keyword'] = '#ff0000'``\n    - ptk style name (string) - ``$XONSH_STYLE_OVERRIDES['pygments.keyword'] = '#ff0000'``\n\n(The rules above are all have the same effect.)", is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_TRACEBACK_LOGFILE = Var(validate=<function is_logfile_opt>, convert=<function to_logfile_opt>, detype=<function logfile_opt_to_str>, default=None, doc='Specifies a file to store the traceback log to, regardless of whether ``XONSH_SHOW_TRACEBACK`` has been set. Its value must be a writable file or None / the empty string if traceback logging is not desired. Logging to a file is not enabled by default.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
XONSH_TRACE_SUBPROC = Var(validate=<function is_bool>, convert=<function to_bool>, detype=<function bool_to_str>, default=False, doc='Set to ``True`` to show arguments list of every executed subprocess command.', is_configurable=True, doc_default=<xonsh.tools.DefaultNotGivenType object>, can_store_as_str=False, pattern=None)
class xonsh.environ.Xettings[source]

Parent class - All setting classes will be inheriting from this. The first line of those class’s docstring will become the group’s title. Rest of the docstring will become the description of that Group of settings.

classmethod get_doc()[source]
classmethod get_group_description()str[source]
classmethod get_group_title()str[source]
classmethod get_groups()Iterator[Tuple[Tuple[xonsh.environ.Xettings, ], Tuple[Tuple[Union[str, Pattern], xonsh.environ.Var], ]]][source]
classmethod get_settings()Iterator[Tuple[Union[str, Pattern], xonsh.environ.Var]][source]
xonsh.environ.default_env(env=None)[source]

Constructs a default xonsh environment.

xonsh.environ.default_lscolors(env)[source]

Gets a default instanse of LsColors

xonsh.environ.default_value(f)[source]

Decorator for making callable default values.

xonsh.environ.default_xonshrc(env)[source]

Creates a new instance of the default xonshrc tuple.

xonsh.environ.ensure_ls_colors_in_env(spec=None, **kwargs)[source]

This ensures that the $LS_COLORS environment variable is in the environment. This fires exactly once upon the first time the ls command is called.

xonsh.environ.foreign_env_fixes(ctx)[source]

Environment fixes for all operating systems

xonsh.environ.is_callable_default(x)[source]

Checks if a value is a callable default.

xonsh.environ.is_lscolors(x)[source]

Checks if an object is an instance of LsColors

xonsh.environ.locale_convert(key)[source]

Creates a converter for a locale key.

xonsh.environ.locate_binary(name)[source]

Locates an executable on the file system.

xonsh.environ.make_args_env(args=None)[source]

Makes a dictionary containing the $ARGS and $ARG<N> environment variables. If the supplied ARGS is None, then sys.argv is used.

xonsh.environ.to_debug(x)[source]

Converts value using to_bool_or_int() and sets this value on as the execer’s debug level.

xonsh.environ.windows_foreign_env_fixes(ctx)[source]

Environment fixes for Windows. Operates in-place.

xonsh.environ.xonsh_append_newline(env)[source]

Appends a newline if we are in interactive mode

xonsh.environ.xonsh_config_dir(env)[source]

Ensures and returns the $XONSH_CONFIG_DIR

xonsh.environ.xonsh_data_dir(env)[source]

Ensures and returns the $XONSH_DATA_DIR

xonsh.environ.xonsh_script_run_control(filename, ctx, env, execer=None, login=True)[source]

Loads a xonsh file and applies it as a run control.

xonsh.environ.xonshconfig(env)[source]

Ensures and returns the $XONSHCONFIG

xonsh.environ.xonshrc_context(rcfiles=None, execer=None, ctx=None, env=None, login=True)[source]

Attempts to read in all xonshrc files and return the context.