summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2013-12-11 23:49:16 +0200
committerLeonid Volnitsky <Leonid@Volnitsky.com>2013-12-11 23:49:16 +0200
commit6e32ba0ca078f94194d5ce23b5307f0a4fd293fd (patch)
tree9d7c8b70be0ed92b82890d7257fc2c4ac4fc75a8
parentfix for issue #37 (branch detection with new git) (diff)
downloadgit-prompt-6e32ba0ca078f94194d5ce23b5307f0a4fd293fd.tar.gz
git-prompt-6e32ba0ca078f94194d5ce23b5307f0a4fd293fd.tar.bz2
git-prompt-6e32ba0ca078f94194d5ce23b5307f0a4fd293fd.zip
work around for vte.sh
-rwxr-xr-xgit-prompt.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index 1cf4b4e..adb6945 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -1,13 +1,18 @@
# don't set prompt if this is not interactive shell
[[ $- != *i* ]] && return
+ # clear vars from previous invocation
+ unset dir_color rc_color user_id_color root_id_color init_vcs_color clean_vcs_color
+ unset modified_vcs_color added_vcs_color addmoded_vcs_color untracked_vcs_color op_vcs_color detached_vcs_color hex_vcs_color
+ unset rawhex_len
+
+ # work around for conflict with vte.sh
+ unset VTE_VERSION
+
################################################################### CONFIG
##### read config file if any.
- unset dir_color rc_color user_id_color root_id_color init_vcs_color clean_vcs_color
- unset modified_vcs_color added_vcs_color addmoded_vcs_color untracked_vcs_color op_vcs_color detached_vcs_color hex_vcs_color
- unset rawhex_len
conf=git-prompt.conf; [[ -r $conf ]] && . $conf
conf=/etc/git-prompt.conf; [[ -r $conf ]] && . $conf
@@ -429,6 +434,9 @@ parse_git_status() {
unset branch status modified added clean init added mixed untracked op detached
+ # work around for VTE bug (hang on printf)
+ unset VTE_VERSION
+
# info not in porcelain status
eval " $(
git status 2>/dev/null |