summaryrefslogtreecommitdiff
path: root/git-prompt.sh
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2008-11-18 09:36:09 +0200
committerLeonid Volnitsky <Leonid@Volnitsky.com>2008-11-18 09:36:09 +0200
commita0c62a25ce78d4deab8237d083dbaa4362c01474 (patch)
tree4dd60cb25fcf1a4c31feaf184b13f410b32feb83 /git-prompt.sh
parent-- minor: docs (diff)
downloadgit-prompt-a0c62a25ce78d4deab8237d083dbaa4362c01474.tar.gz
git-prompt-a0c62a25ce78d4deab8237d083dbaa4362c01474.tar.bz2
git-prompt-a0c62a25ce78d4deab8237d083dbaa4362c01474.zip
added test if shell is interactive
Diffstat (limited to 'git-prompt.sh')
-rw-r--r--git-prompt.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index d21786a..54ef999 100644
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -1,3 +1,8 @@
+
+# don't set prompt if this is not interactive shell
+# it is better if this test is done before git-prompt.sh is sources for perfomanse reasons.
+[[ $- != *i* ]] && return
+
##################################################################### CONFIG
default_user=lvv # default user is not displayed
default_host="ahp" # default host is not displayed