Screen Friendly ZSH Prompt


/ Published in: Bash
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.