Mercurial > dotfiles
comparison .shell.d/99.prompt.zsh @ 178:da329720ff18
zsh prompt: add urxvt to whitelisted terms, use a loop instead of many ifs
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Wed, 13 Jan 2010 10:28:44 -0600 |
| parents | 62bfb554ab85 |
| children | ebbbf3567a0e |
comparison
equal
deleted
inserted
replaced
| 177:70dcdb2acade | 178:da329720ff18 |
|---|---|
| 43 PS1=$'%{\ek[%2~ zsh]\e\\%}[%m:%3~] %{\e[34m%}%n%{\e[0m%}%# ' | 43 PS1=$'%{\ek[%2~ zsh]\e\\%}[%m:%3~] %{\e[34m%}%n%{\e[0m%}%# ' |
| 44 fi | 44 fi |
| 45 RPS1=$'[$rps_branch]%(?..%{\e[1;33m%} %?%{\e[0m%})' | 45 RPS1=$'[$rps_branch]%(?..%{\e[1;33m%} %?%{\e[0m%})' |
| 46 fi | 46 fi |
| 47 | 47 |
| 48 if [ "$TERM" = "rxvt" ] || [ "$TERM" = "xterm" ] \ | 48 |
| 49 || [ "$TERM" = "xterm-color" ] || [ "$TERM" = "screen" ]; then | 49 export FANCYTYPE="NO" |
| 50 export FANCYTYPE="YES" | 50 |
| 51 else | 51 for ok in rxvt rxvt-unicode xterm xterm-color screen ; do |
| 52 export FANCYTYPE="NO" | 52 if [ "$TERM" = "$ok" ] ; then |
| 53 prompt='[%m:%3~] %n%# ' | 53 export FANCYTYPE="YES" |
| 54 RPS1=$'[%W %t]' | 54 fi |
| 55 done | |
| 56 | |
| 57 if [ $FANCYTYPE = "NO" ] ; then | |
| 58 prompt='[%m:%3~] %n%# ' | |
| 59 RPS1=$'[%W %t]' | |
| 55 fi | 60 fi |
| 56 | 61 |
| 57 #nonfancy no-frills prompt - disabled (same as the "non-fancy" one above) | 62 #nonfancy no-frills prompt - disabled (same as the "non-fancy" one above) |
| 58 #prompt='[%m:%3~] %n%# ' | 63 #prompt='[%m:%3~] %n%# ' |
| 59 #RPS1=$'[%W %t]' | 64 #RPS1=$'[%W %t]' |
