Prompt formatter for virtualenv and others
- xonsh.prompt.env.env_name() str #
Build env_name based on different sources. Respect order of precedence.
Name from VIRTUAL_ENV_PROMPT will be used as-is. Names from other sources are surrounded with
- xonsh.prompt.env.find_env_name() Optional[str] #
Find current environment name from available sources.
$VIRTUAL_ENVis set, it is determined from the prompt setting in
<venv>/pyvenv.cfgor from the folder name of the environment.
Otherwise - if it is set - from
- xonsh.prompt.env.vte_new_tab_cwd() None #
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.