Dotfiles/.zsh/lib/promt.zsh
2014-04-16 21:42:19 +02:00

25 lines
895 B
Bash

# autoload -U add-zsh-hook
autoload -Uz vcs_info
# # enable VCS systems you use
zstyle ':vcs_info:*' enable git svn
zstyle ':vcs_info:*:prompt:*' check-for-changes true
setopt prompt_subst
autoload -U promptinit
promptinit
# Look at http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Version-Control-Information
# for mor options
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*' unstagedstr '*' # display this when there are unstaged changes
zstyle ':vcs_info:*' stagedstr '+' # display this when there are staged changes
zstyle ':vcs_info:*' actionformats '[%b%|%a%c%u%]%f'
zstyle ':vcs_info:*' formats ':%b%c%u%f'
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
precmd () { vcs_info }
PROMPT='[%(!.%{$fg[red]%}%n@%m%{$reset_color%}.%{$fg[blue]%}%n@%m%{$reset_color%}) %~%{$fg[green]%}${vcs_info_msg_0_}%{$reset_color%}] %{$reset_color%}'