Virtualenv prompt formatter (
Prompt formatter for virtualenv and others
Extract the current environment name from $VIRTUAL_ENV or $CONDA_DEFAULT_ENV if that is set
This prints an escape squence 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.