Make virtualenv and docker prompt vars local

This commit is contained in:
Kenneth Benzie 2018-09-01 10:39:09 +01:00
parent 8819cd4d18
commit 6a4531423e

View File

@ -124,12 +124,12 @@ fresh_line_one() {
# If a virtualenv is enabled, display it's basename # If a virtualenv is enabled, display it's basename
if [[ ! -z "$VIRTUAL_ENV" ]]; then if [[ ! -z "$VIRTUAL_ENV" ]]; then
py=" %{%F{4}%}py%{%f%}%{%F{3}%}$(basename $VIRTUAL_ENV)%{%f%}" local py=" %{%F{4}%}py%{%f%}%{%F{3}%}$(basename $VIRTUAL_ENV)%{%f%}"
fi fi
# If docker-machine env is active, display the machines name # If docker-machine env is active, display the machines name
if [[ ! -z "$DOCKER_MACHINE_NAME" ]]; then if [[ ! -z "$DOCKER_MACHINE_NAME" ]]; then
docker=" %{%F{6}%}$DOCKER_MACHINE_NAME%{%f%}" local docker=" %{%F{6}%}$DOCKER_MACHINE_NAME%{%f%}"
fi fi
# Print the first line of the prompt # Print the first line of the prompt