Last active
September 16, 2015 05:37
-
-
Save Lytol/f1e5690a9e39e7e31d04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' stagedstr '%F{green}●%f' | |
zstyle ':vcs_info:*' unstagedstr '%F{red}●%f' | |
zstyle ':vcs_info:*' check-for-changes true | |
zstyle ':vcs_info:*' formats '[%F{027}%b%f%c%u] ' | |
zstyle ':vcs_info:*' enable git | |
theme_precmd () { | |
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] { | |
zstyle ':vcs_info:*' formats '[%F{027}%b%f%c%u] ' | |
} else { | |
zstyle ':vcs_info:*' formats '[%F{027}%b%f%F{red}●%f] ' | |
} | |
vcs_info | |
} | |
setopt prompt_subst | |
PROMPT='%F{208}λ%f %B%~/%b ${vcs_info_msg_0_}» ' | |
autoload -U add-zsh-hook | |
add-zsh-hook precmd theme_precmd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment