From 8993e65177ef5ec158f2a8f417054e4dc91137c3 Mon Sep 17 00:00:00 2001 From: Carlo Sciolla Date: Fri, 1 Feb 2013 15:24:13 +0100 Subject: [PATCH] Enable custom __GIT_PROMPT_DIR as an env var I'd like to directly point bash to where I checked out the source code. With this change I can customize at least the base directory with an environment variable while the default value is still there. --- gitprompt.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitprompt.sh b/gitprompt.sh index f767f7e..ca681bd 100644 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -1,4 +1,7 @@ -__GIT_PROMPT_DIR=~/.bash +if [ "x$__GIT_PROMPT_DIR" == "x" ] +then + __GIT_PROMPT_DIR=~/.bash +fi # Colors # Reset