Python Virtualenv prompt double newlines in 2.9.20151111
iTerm2 Version: 2.9.20151111 OSX: 10.11.1
Bug:
- Python Virtualenv prompt modification (prefix addition) causes multiple newlines to be printed after every command in the terminal
Reproduce:
Thoughts:
I have looking at bin/activate
in the virtualenv it seems like the part causing the issue is:
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
_OLD_VIRTUAL_PS1="$PS1"
if [ "x" != x ] ; then
PS1="$PS1"
else
if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then
# special case for Aspen magic directories
# see http://www.zetadev.com/software/aspen/
PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1"
else
PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1"
fi
fi
export PS1
fi
Not familiar enough with how prompts work to dig futher.
I have confirmed this does not cause an issue with VIRTUAL_ENV_DISABLE_PROMPT set.