]> gitweb @ CieloNegro.org - sugar.git/blobdiff - dot-files/_zshrc
Auto commit by The Sugar System.
[sugar.git] / dot-files / _zshrc
index 936c5316c83dc0af3601afd84b8976a2e2020730..20e6997229dde0d82812358b1aabe05efa751193 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|env|time|-*|[0-9]*)]}
+        printf "\ek$cmd\e\\"
+    fi
+}
+
 RPROMPT='%U%D{%m/%d}%u %U%D{%T}%u %U%~%u'
 
 HISTFILE="$HOME/.zhistory"
@@ -99,6 +108,7 @@ alias aria-emacs="ssh -f -X admin@aria.cielonegro.org emacs"
 
 alias g1="ssh pho@g1.cuenote.jp"
 alias g2="ssh pho@g2.cuenote.jp"
+alias mana="ssh pho@mana"
 
 if [ $(hostname) = "aria.cielonegro.org" ]; then
     alias safari="open -a Safari"