From 6a4531423e11cf0a2388b362f88b51b6bb7ea759 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sat, 1 Sep 2018 10:39:09 +0100 Subject: [PATCH] Make virtualenv and docker prompt vars local --- prompt_fresh_setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prompt_fresh_setup b/prompt_fresh_setup index fde4845..7bc4666 100644 --- a/prompt_fresh_setup +++ b/prompt_fresh_setup @@ -124,12 +124,12 @@ fresh_line_one() { # If a virtualenv is enabled, display it's basename 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 # If docker-machine env is active, display the machines name if [[ ! -z "$DOCKER_MACHINE_NAME" ]]; then - docker=" %{%F{6}%}$DOCKER_MACHINE_NAME%{%f%}" + local docker=" %{%F{6}%}$DOCKER_MACHINE_NAME%{%f%}" fi # Print the first line of the prompt