]> gitweb @ CieloNegro.org - sugar.git/commitdiff
hand merge to resolve _zshrc conflict
authorPHO <pho@cielonegro.org>
Mon, 5 Jan 2009 08:42:23 +0000 (17:42 +0900)
committerPHO <pho@cielonegro.org>
Mon, 5 Jan 2009 08:42:23 +0000 (17:42 +0900)
1  2 
dot-files/_zshrc

index 25a5ee636e85c39bbcc1afddc5ea483148b9f556,dd762ec5079f9c75255bffe01b8cbc1f86ff5851..fc238a3f8a656a67b3c739a3ce1d4264855544fe
@@@ -52,9 -49,12 +52,19 @@@ setopt hist_ignore_spac
  setopt inc_append_history
  setopt share_history
  
- PROMPT=$'%{\ek\e\\%}%{%(?.$fg[green].$fg[red])%}%B[%n@%m] %#%b %{$reset_color%}'
+ function _we_are_in_gnu_screen () {
+     [ "$WINDOW" != "" ]
+ }
 -PROMPT=$'%{\ek\e\\%}%B[%n@%m] %#%b '
 -RPROMPT='%U%?%u %U%D{%m/%d}%u %U%D{%T}%u %U%~%u'
++_prompt_base='%{%(?.$fg[green].$fg[red])%}%B[%n@%m] %#%b %{$reset_color%}'
++if ( _we_are_in_gnu_screen ); then
++    PROMPT=$'%{\ek\e\\%}'$_prompt_base
++else
++    PROMPT=$_prompt_base
++fi
++
 +RPROMPT='%U%D{%m/%d}%u %U%D{%T}%u %U%~%u'
 +
  HISTFILE="$HOME/.zhistory"
  HISTSIZE=6000000
  SAVEHIST=6000000