Virtualenv prompt formatter (xonsh.prompt.env)

Prompt formatter for virtualenv and others

xonsh.prompt.env.env_name()[source]

Returns the current env_name if it non-empty, surrounded by the {env_prefix} and {env_postfix} fields.

xonsh.prompt.env.find_env_name()[source]

Finds the current environment name from $VIRTUAL_ENV or $CONDA_DEFAULT_ENV if that is set.

xonsh.prompt.env.vte_new_tab_cwd()[source]

This prints an escape sequence that tells VTE terminals the hostname and pwd. This should not be needed in most cases, but sometimes is for certain Linux terminals that do not read the PWD from the environment on startup. Note that this does not return a string, it simply prints and flushes the escape sequence to stdout directly.