Skip to content

Instantly share code, notes, and snippets.

@ohanhi
Created February 3, 2017 11:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ohanhi/840cd974754fc35d158336cb770d037c to your computer and use it in GitHub Desktop.
Save ohanhi/840cd974754fc35d158336cb770d037c to your computer and use it in GitHub Desktop.
autoload -U colors && colors
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}•'
zstyle ':vcs_info:*' unstagedstr '%F{yellow}•'
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' enable git svn
theme_precmd () {
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
zstyle ':vcs_info:*' formats ' (%b%c%u%F{248})'
} else {
zstyle ':vcs_info:*' formats ' (%b%c%u%F{red}•%F{248})'
}
vcs_info
}
# setopt prompt_subst
PROMPT='%F{magenta}%~%F{248}${vcs_info_msg_0_}%{$reset_color%}› '
autoload -U add-zsh-hook
add-zsh-hook precmd theme_precmd
@ohanhi
Copy link
Author

ohanhi commented Feb 3, 2017

Screenshots

Black on white, Tango:

screenshot

Solarized Dark, Tango:

zsh-theme-solarized-dark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment