summaryrefslogtreecommitdiff
path: root/git-prompt.sh
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2009-04-16 20:33:14 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2009-04-17 15:48:41 +0300
commit109ea33efe6016e8edda242fbd3dc7512442f45e (patch)
treeee8c28897a0ead20a2471b4e4488be4debe3c46f /git-prompt.sh
parentfixed: not bash prompt escapes around bell (diff)
downloadgit-prompt-109ea33efe6016e8edda242fbd3dc7512442f45e.tar.gz
git-prompt-109ea33efe6016e8edda242fbd3dc7512442f45e.tar.bz2
git-prompt-109ea33efe6016e8edda242fbd3dc7512442f45e.zip
current-command is show in label (xterm title)
reimplemented trough trap-debug http://www.davidpashley.com/articles/xterm-titles-with-bash.html
Diffstat (limited to 'git-prompt.sh')
-rw-r--r--git-prompt.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index b14d5c6..72d636f 100644
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -469,6 +469,9 @@ parse_vcs_dir() {
}
+trap - DEBUG #>& /dev/null
+trap '[[ $BASH_COMMAND != prompt_command_function ]] && set_shell_title $BASH_COMMAND' DEBUG #>& /dev/null
+
###################################################################### PROMPT_COMMAND
prompt_command_function() {
@@ -487,7 +490,6 @@ prompt_command_function() {
unset head_local tail_local
}
-
PROMPT_COMMAND=prompt_command_function
unset rc id tty modified_files file_list