]> gitweb @ CieloNegro.org - sugar.git/blobdiff - dot-files/_zshrc
Auto commit by The Sugar System.
[sugar.git] / dot-files / _zshrc
index 6392b2614bf962acfd805ed1d9b01fb9a627eca9..b01a0b99c2a63cff1c6fe6982f39228465f9338d 100644 (file)
@@ -60,11 +60,20 @@ _prompt_base='%B[%n@%m] %{%(?.$fg[green].$fg[red])%}%#%{$reset_color%}%b '
 if ( _we_are_in_gnu_screen ); then
     # Magic escape sequence for GNU Screen to update their titles
     # dynamically by grabbing prompt line.
-    PROMPT=$'%{\ek\e\\%}'$_prompt_base
+    #PROMPT=$'%{\ek\e\\%}'$_prompt_base
+
+    PROMPT=$'%{\ek_\e\\%}'$_prompt_base
 else
     PROMPT=$_prompt_base
 fi
 
+function preexec() {
+    if ( _we_are_in_gnu_screen ); then
+        local cmd=${1[(wr)^(*=*|sudo|nice|-*|[0-9]*)]}
+        printf "\ek$cmd\e\\"
+    fi
+}
+
 RPROMPT='%U%D{%m/%d}%u %U%D{%T}%u %U%~%u'
 
 HISTFILE="$HOME/.zhistory"