Posted By

wesalvaro on 08/05/10


Tagged

screen zsh prompt


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

sdudenhofer


Screen Friendly ZSH Prompt


 / Published in: Bash
 

  1. autoload -Uz colors && colors
  2. local text="%{$fg_no_bold[cyan]%}"
  3. local text_emph="%{$fg_bold[cyan]%}"
  4. local punctuation="%{$fg_bold[grey]%}"
  5. local emph="%{$fg_bold[white]%}"
  6. local final="%{$reset_color%}"
  7.  
  8. local window="" # Screen number
  9. local window_sep="" # Screen number separator
  10. if [[ "$STY" != "" ]]; then
  11. local window="$WINDOW"
  12. local window_sep=":"
  13. fi
  14.  
  15. PROMPT="${punctuation}(${text_emph}%n${emph}@${text}%m${punctuation})(${emph}$window${punctuation}$window_sep${text}%j${punctuation})(${text}%D{%a, %b %d:%S}${punctuation})-
  16. (${emph}%#${punctuation}:%!${text}:%2~${punctuation})-${final} "
  17.  
  18. RPROMPT="${text}%_${punctuation}|-${final} "

Report this snippet  

You need to login to post a comment.