about summary refs log tree commit diff
path: root/home/shell/zsh/prompt.zsh
blob: 8a3efa9f39e6d9e27d3b5760e84058f402027783 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
setopt prompt_subst

autoload -Uz vcs_info

# display the name of the branch
zstyle ':vcs_info:git*' formats " [%b]"
zstyle ':vcs_info:*' enable git

precmd () { vcs_info }
PROMPT='%m%f:%F{green}%~%f%F{yellow}$vcs_info_msg_0_ %F{reset}'

# For tramp (emacs).
if [ "$TERM" = "dumb" ]; then
  unset PROMPT
  PS1='$ '
  unsetopt zle
fi