diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2008-11-18 09:36:09 +0200 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2008-11-18 09:36:09 +0200 |
commit | a0c62a25ce78d4deab8237d083dbaa4362c01474 (patch) | |
tree | 4dd60cb25fcf1a4c31feaf184b13f410b32feb83 /git-prompt.sh | |
parent | -- minor: docs (diff) | |
download | git-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.sh | 5 |
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 |