[vte/vte-0-36] prompt: Make zsh hook to precmd.



commit e102da687242aa0820225e4fe47b84869229fb63
Author: Michal Sojka <sojkam1 fel cvut cz>
Date:   Mon Mar 3 11:50:38 2014 +0100

    prompt: Make zsh hook to precmd.
    
    Previously used chpwd hook caused the escape sequence to be printed when
    it shouldn't be printed. For example, when user wanted to list files in
    a directory with "(cd dir; find) > list.txt", list.txt contained not
    only the files but also the VTE escape sequence.
    
    This patch changes the hook to precmd, which is invoked before
    displaying prompt. This is the same "hook" that is used in bash.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724982

 src/vte.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/vte.sh b/src/vte.sh
index dd06956..3b57f83 100644
--- a/src/vte.sh
+++ b/src/vte.sh
@@ -56,7 +56,7 @@ __vte_prompt_command() {
 case "$TERM" in
   xterm*|vte*)
     [ -n "$BASH_VERSION" ] && PROMPT_COMMAND="__vte_prompt_command" 
-    [ -n "$ZSH_VERSION"  ] && chpwd_functions+=(__vte_osc7)
+    [ -n "$ZSH_VERSION"  ] && precmd_functions+=(__vte_osc7)
     ;;
 esac
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]