mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Added $XONSH_SHOW_TRACEBACK option to the docs.
This commit is contained in:
parent
0c3f345e1b
commit
aab900cdb1
1 changed files with 74 additions and 67 deletions
|
@ -164,73 +164,80 @@ useful to have more sophisticated types, like functions, in the environment.
|
|||
There are handful of environment variables that xonsh considers special.
|
||||
They can be seen in the table below:
|
||||
|
||||
================== ============================= ================================
|
||||
variable default description
|
||||
================== ============================= ================================
|
||||
PROMPT xonsh.environ.DEFAULT_PROMPT The prompt text. May contain
|
||||
keyword arguments which are
|
||||
auto-formatted (see `Customizing
|
||||
the Prompt`_ below).
|
||||
MULTILINE_PROMPT ``'.'`` Prompt text for 2nd+ lines of
|
||||
input, may be str or
|
||||
function which returns a str.
|
||||
TITLE xonsh.environ.DEFAULT_TITLE The title text for the window
|
||||
in which xonsh is running.
|
||||
Formatted in the same manner
|
||||
as PROMPT (see `Customizing the
|
||||
Prompt`_ below).
|
||||
FORMATTER_DICT xonsh.environ.FORMATTER_DICT Dictionary containing variables
|
||||
to be used when formatting PROMPT
|
||||
and TITLE (see `Customizing the
|
||||
Prompt`_ below).
|
||||
XONSHRC ``'~/.xonshrc'`` Location of run control file
|
||||
XONSH_HISTORY_SIZE 8128 Number of items to store in the
|
||||
history.
|
||||
XONSH_HISTORY_FILE ``'~/.xonsh_history'`` Location of history file
|
||||
XONSH_INTERACTIVE ``True`` if xonsh is running
|
||||
interactively, and ``False``
|
||||
otherwise.
|
||||
BASH_COMPLETIONS ``[] or ['/etc/...']`` This is a list of strings that
|
||||
specifies where the BASH
|
||||
completion files may be found.
|
||||
The default values are platform
|
||||
dependent, but sane. To
|
||||
specify an alternate list,
|
||||
do so in the run control file.
|
||||
SUGGEST_COMMANDS ``True`` When a user types an invalid
|
||||
command, xonsh will try to offer
|
||||
suggestions of similar valid
|
||||
commands if this is ``True``.
|
||||
SUGGEST_THRESHOLD ``3`` 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.
|
||||
SUGGEST_MAX_NUM ``5`` 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.
|
||||
SHELL_TYPE ``'readline'`` Which shell is used.
|
||||
Currently two shell types are
|
||||
supported: ``'readline'`` that
|
||||
is backed by python's readline
|
||||
module and ``'prompt_toolkit'``
|
||||
that uses external library of
|
||||
the same name. For using
|
||||
prompt_toolkit shell you need
|
||||
to have `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.
|
||||
CDPATH ``[]`` A list of paths to be used as
|
||||
roots for a `cd`, breaking
|
||||
compatibility with bash, xonsh
|
||||
always prefer an existing
|
||||
relative path.
|
||||
================== ============================= ================================
|
||||
==================== ============================= ================================
|
||||
variable default description
|
||||
==================== ============================= ================================
|
||||
PROMPT xonsh.environ.DEFAULT_PROMPT The prompt text. May contain
|
||||
keyword arguments which are
|
||||
auto-formatted (see `Customizing
|
||||
the Prompt`_ below).
|
||||
MULTILINE_PROMPT ``'.'`` Prompt text for 2nd+ lines of
|
||||
input, may be str or
|
||||
function which returns a str.
|
||||
TITLE xonsh.environ.DEFAULT_TITLE The title text for the window
|
||||
in which xonsh is running.
|
||||
Formatted in the same manner
|
||||
as PROMPT (see `Customizing the
|
||||
Prompt`_ below).
|
||||
FORMATTER_DICT xonsh.environ.FORMATTER_DICT Dictionary containing variables
|
||||
to be used when formatting PROMPT
|
||||
and TITLE (see `Customizing the
|
||||
Prompt`_ below).
|
||||
XONSHRC ``'~/.xonshrc'`` Location of run control file
|
||||
XONSH_HISTORY_SIZE 8128 Number of items to store in the
|
||||
history.
|
||||
XONSH_HISTORY_FILE ``'~/.xonsh_history'`` Location of history file
|
||||
XONSH_INTERACTIVE ``True`` if xonsh is running
|
||||
interactively, and ``False``
|
||||
otherwise.
|
||||
BASH_COMPLETIONS ``[] or ['/etc/...']`` This is a list of strings that
|
||||
specifies where the BASH
|
||||
completion files may be found.
|
||||
The default values are platform
|
||||
dependent, but sane. To
|
||||
specify an alternate list,
|
||||
do so in the run control file.
|
||||
SUGGEST_COMMANDS ``True`` When a user types an invalid
|
||||
command, xonsh will try to offer
|
||||
suggestions of similar valid
|
||||
commands if this is ``True``.
|
||||
SUGGEST_THRESHOLD ``3`` 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.
|
||||
SUGGEST_MAX_NUM ``5`` 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.
|
||||
SHELL_TYPE ``'readline'`` Which shell is used.
|
||||
Currently two shell types are
|
||||
supported: ``'readline'`` that
|
||||
is backed by python's readline
|
||||
module and ``'prompt_toolkit'``
|
||||
that uses external library of
|
||||
the same name. For using
|
||||
prompt_toolkit shell you need
|
||||
to have `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.
|
||||
CDPATH ``[]`` A list of paths to be used as
|
||||
roots for a `cd`, breaking
|
||||
compatibility with bash, xonsh
|
||||
always prefer an existing
|
||||
relative path.
|
||||
XONSH_SHOW_TRACEBACK Not defined Controls if a traceback is shown when
|
||||
exceptions occur in the shell.
|
||||
Set ``'True'`` to always show
|
||||
or ``'False'`` to always hide.
|
||||
If undefined then traceback is
|
||||
hidden but a notice is shown on
|
||||
how to enable the traceback.
|
||||
==================== ============================= ================================
|
||||
|
||||
Environment Lookup with ``${}``
|
||||
================================
|
||||
|
|
Loading…
Add table
Reference in a new issue