Dotfiles/.zsh/lib/promt.zsh
2012-04-24 08:58:49 +02:00

25 lines
No EOL
796 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='[%n@%m %~${vcs_info_msg_0_}] %{$reset_color%}'