X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=dot-files%2F_zshrc;h=b01a0b99c2a63cff1c6fe6982f39228465f9338d;hb=e6b7cb629e21c21dd43423158020810d40477204;hp=6392b2614bf962acfd805ed1d9b01fb9a627eca9;hpb=60160a7d5a26cf4ab4ce98ae467fb1cd9092a532;p=sugar.git diff --git a/dot-files/_zshrc b/dot-files/_zshrc index 6392b26..b01a0b9 100644 --- a/dot-files/_zshrc +++ b/dot-files/_zshrc @@ -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"