2015-08-29 16:35:46 -04:00
|
|
|
Environment Variables
|
|
|
|
=====================
|
|
|
|
The following table displays information about the environment variables that
|
|
|
|
effect XONSH performance in some way. It also lists their default values, if
|
|
|
|
applicable.
|
|
|
|
|
2015-10-19 19:59:29 -04:00
|
|
|
.. Please keep the following in alphabetic order - scopatz
|
|
|
|
|
2015-08-29 16:35:46 -04:00
|
|
|
.. list-table::
|
|
|
|
:widths: 1 1 3
|
|
|
|
:header-rows: 1
|
|
|
|
|
|
|
|
* - variable
|
|
|
|
- default
|
|
|
|
- description
|
2015-10-10 15:59:51 -04:00
|
|
|
* - ANSICON
|
|
|
|
- No default set
|
|
|
|
- This is used on Windows to set the title, if available.
|
2015-10-10 16:45:02 -04:00
|
|
|
* - AUTO_PUSHD
|
|
|
|
- ``False``
|
|
|
|
- Flag for automatically pushing directorties onto the directory stack.
|
2015-10-25 23:19:59 +01:00
|
|
|
* - AUTO_SUGGEST
|
|
|
|
- ``True``
|
|
|
|
- Enable automatic command suggestions based on history (like in fish shell).
|
|
|
|
Pressing the right arrow key inserts the currently displayed suggestion.
|
|
|
|
(Only usable with SHELL_TYPE=prompt_toolkit)
|
2015-10-10 15:35:54 -04:00
|
|
|
* - BASH_COMPLETIONS
|
2015-10-12 00:45:03 -04:00
|
|
|
- Normally this is ``('/etc/bash_completion', '/usr/share/bash-completion/completions/git')``
|
2015-10-26 15:11:51 -04:00
|
|
|
but on Mac is ``('/usr/local/etc/bash_completion', '/opt/local/etc/profile.d/bash_completion.sh')``
|
|
|
|
and on Arch Linux is ``('/usr/share/bash-completion/bash_completion',
|
|
|
|
'/usr/share/bash-completion/completions/git')``.
|
2015-10-10 15:35:54 -04:00
|
|
|
- This is a list (or tuple) 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.
|
|
|
|
* - CASE_SENSITIVE_COMPLETIONS
|
|
|
|
- ``True`` on Linux, otherwise ``False``
|
|
|
|
- Sets whether completions should be case sensitive or case insensitive.
|
|
|
|
* - CDPATH
|
|
|
|
- ``[]``
|
|
|
|
- A list of paths to be used as roots for a ``cd``, breaking compatibility with
|
|
|
|
bash, xonsh always prefer an existing relative path.
|
2015-10-10 16:45:02 -04:00
|
|
|
* - DIRSTACK_SIZE
|
|
|
|
- ``20``
|
|
|
|
- Maximum size of the directory stack.
|
2015-10-10 15:35:54 -04:00
|
|
|
* - FORCE_POSIX_PATHS
|
2015-10-10 15:53:38 -04:00
|
|
|
- ``False``
|
2015-10-10 15:35:54 -04:00
|
|
|
- Forces forward slashes (``/``) on Windows systems when using auto completion if
|
|
|
|
set to anything truthy.
|
|
|
|
* - FORMATTER_DICT
|
|
|
|
- xonsh.environ.FORMATTER_DICT
|
|
|
|
- Dictionary containing variables to be used when formatting PROMPT and TITLE
|
|
|
|
see `Customizing the Prompt <tutorial.html#customizing-the-prompt>`_.
|
2015-10-10 15:53:38 -04:00
|
|
|
* - INDENT
|
|
|
|
- ``' '``
|
|
|
|
- Indentation string for multiline input
|
2015-10-19 19:59:29 -04:00
|
|
|
* - MOUSE_SUPPORT
|
|
|
|
- ``False``
|
|
|
|
- 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)
|
2015-10-10 15:35:54 -04:00
|
|
|
* - MULTILINE_PROMPT
|
|
|
|
- ``'.'``
|
|
|
|
- Prompt text for 2nd+ lines of input, may be str or function which returns
|
|
|
|
a str.
|
2015-10-10 16:45:02 -04:00
|
|
|
* - OLDPWD
|
|
|
|
- No default
|
|
|
|
- Used to represent a previous present working directory.
|
2015-10-10 15:53:38 -04:00
|
|
|
* - PATH
|
|
|
|
- ``()``
|
|
|
|
- List of strings representing where to look for executables.
|
2015-10-10 16:45:02 -04:00
|
|
|
* - PATHEXT
|
|
|
|
- ``()``
|
|
|
|
- List of strings for filtering valid exeutables by.
|
2015-08-29 16:35:46 -04:00
|
|
|
* - PROMPT
|
|
|
|
- xonsh.environ.DEFAULT_PROMPT
|
|
|
|
- The prompt text. May contain keyword arguments which are auto-formatted,
|
|
|
|
see `Customizing the Prompt <tutorial.html#customizing-the-prompt>`_.
|
2015-10-10 16:45:02 -04:00
|
|
|
* - PROMPT_TOOLKIT_STYLES
|
|
|
|
- ``None``
|
|
|
|
- This is a mapping of user-specified styles for prompt-toolkit. See the
|
|
|
|
prompt-toolkit documentation for more details. If None, this is skipped.
|
|
|
|
* - PUSHD_MINUS
|
|
|
|
- ``False``
|
|
|
|
- Flag for directory pushing functionality. False is the normal behaviour.
|
|
|
|
* - PUSHD_SILENT
|
|
|
|
- ``False``
|
|
|
|
- Whether or not to supress directory stack manipulation output.
|
2015-10-10 15:35:54 -04:00
|
|
|
* - 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.
|
|
|
|
* - 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_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.
|
|
|
|
* - 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.
|
2015-10-11 14:23:30 -04:00
|
|
|
* - TEEPTY_PIPE_DELAY
|
|
|
|
- ``0.01``
|
|
|
|
- The number of [seconds] to delay a spawned process if it has information
|
|
|
|
being piped in via stdin. This value must be a float. If a value less than
|
|
|
|
or equal to zero is passed in, no delay is used. This can be used to fix
|
|
|
|
situations where a spawned process, such as piping into ``grep``, exits
|
|
|
|
too quickly for the piping operation itself. TeePTY (and thus this variable)
|
|
|
|
are currently only used when ``$XONSH_STORE_STDOUT`` is ``True``.
|
2015-10-10 15:59:51 -04:00
|
|
|
* - TERM
|
|
|
|
- No default
|
|
|
|
- TERM is sometimes set by the terminal emulator. This is used (when valid)
|
|
|
|
to determine whether or not to set the title. Users shouldn't need to
|
|
|
|
set this themselves.
|
2015-08-29 16:35:46 -04:00
|
|
|
* - 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 <tutorial.html#customizing-the-prompt>`_.
|
2015-10-10 15:53:38 -04:00
|
|
|
* - XDG_CONFIG_HOME
|
|
|
|
- ``~/.config``
|
|
|
|
- Open desktop standard configuration home dir. This is the same default as
|
|
|
|
used in the standard.
|
|
|
|
* - XDG_DATA_HOME
|
|
|
|
- ``~/.local/share``
|
|
|
|
- Open desktop standard data home dir. This is the same default as used
|
|
|
|
in the standard.
|
2015-10-10 22:34:30 -04:00
|
|
|
* - XONSHCONFIG
|
|
|
|
- ``$XONSH_CONFIG_DIR/config.json``
|
|
|
|
- The location of the static xonsh configuration file, if it exists. This is
|
|
|
|
in JSON format.
|
2015-08-29 16:35:46 -04:00
|
|
|
* - XONSHRC
|
2015-10-26 11:16:36 -04:00
|
|
|
- ``('/etc/xonshrc', '~/.xonshrc')`` (Linux and OSX)
|
|
|
|
``('%ALLUSERSPROFILE%\xonsh\xonshrc', '~/.xonshrc')`` (Windows)
|
2015-10-21 17:17:05 -04:00
|
|
|
- A tuple of the locations of run control files, if they exist. User defined
|
|
|
|
run control file will supercede values set in system-wide control file if there
|
|
|
|
is a naming collision.
|
2015-10-10 15:35:54 -04:00
|
|
|
* - XONSH_CONFIG_DIR
|
|
|
|
- ``$XDG_CONFIG_HOME/xonsh``
|
|
|
|
- This is location where xonsh configuration information is stored.
|
|
|
|
* - XONSH_DATA_DIR
|
|
|
|
- ``$XDG_DATA_HOME/xonsh``
|
|
|
|
- This is the location where xonsh data files are stored, such as history.
|
|
|
|
* - XONSH_HISTORY_FILE
|
|
|
|
- ``'~/.xonsh_history'``
|
|
|
|
- Location of history file (deprecated).
|
2015-08-29 16:35:46 -04:00
|
|
|
* - XONSH_HISTORY_SIZE
|
|
|
|
- ``(8128, 'commands')`` or ``'8128 commands'``
|
|
|
|
- Value and units tuple that sets the size of history after garbage collection.
|
|
|
|
Canonical units are ``'commands'`` for the number of past commands executed,
|
|
|
|
``'files'`` for the number of history files to keep, ``'s'`` for the number of
|
|
|
|
seconds in the past that are allowed, and ``'b'`` for the number of bytes that
|
|
|
|
are allowed for history to consume. Common abbreviations, such as ``6 months``
|
|
|
|
or ``1 GB`` are also allowed.
|
|
|
|
* - XONSH_INTERACTIVE
|
|
|
|
-
|
|
|
|
- ``True`` if xonsh is running interactively, and ``False`` otherwise.
|
|
|
|
* - XONSH_SHOW_TRACEBACK
|
2015-10-10 15:53:38 -04:00
|
|
|
- ``False`` but not set
|
|
|
|
- Controls if a traceback is shown exceptions occur in the shell. Set ``True``
|
|
|
|
to always show or ``False`` to always hide. If undefined then traceback is
|
2015-08-29 16:35:46 -04:00
|
|
|
hidden but a notice is shown on how to enable the traceback.
|
2015-10-10 15:35:54 -04:00
|
|
|
* - XONSH_STORE_STDOUT
|
|
|
|
- ``False``
|
|
|
|
- Whether or not to store the stdout and stderr streams in the history files.
|
2015-08-29 16:35:46 -04:00
|
|
|
|