ys.zsh-theme 907 B

12345678910111213141516171819202122
  1. # Clean, simple, compatible and meaningful.
  2. # Tested on Linux, Unix and Windows.
  3. # It is recommanded to use with a dark background and the font Inconsolata.
  4. # Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
  5. #
  6. # Oct 2012 ys
  7. function box_name {
  8. [ -f ~/.box-name ] && cat ~/.box-name || hostname -s
  9. }
  10. local current_dir='${PWD/#$HOME/~}'
  11. local git_info='$(git_prompt_info)'
  12. ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}on%{$reset_color%} git:%{$fg[cyan]%}"
  13. ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
  14. ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}x"
  15. ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}o"
  16. PROMPT="
  17. # %{$fg[green]%}%n%{$reset_color%} %{$fg[white]%}at%{$reset_color%} %{$fg[cyan]%}$(box_name)%{$reset_color%} %{$fg[white]%}in%{$reset_color%} %{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}${git_info} %{$fg[white]%}[%*]%{$reset_color%}
  18. %{$fg[red]%}$ %{$reset_color%}"