diff options
Diffstat (limited to '')
-rw-r--r-- | home/shell/zsh/prompt.zsh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/home/shell/zsh/prompt.zsh b/home/shell/zsh/prompt.zsh index 291f436..8473f72 100644 --- a/home/shell/zsh/prompt.zsh +++ b/home/shell/zsh/prompt.zsh @@ -1,6 +1,13 @@ setopt prompt_subst -PROMPT='%K{cyan}%F{black}%m%k%f %~ %% ' +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="%K{cyan}%F{black}%n@%m%k%F{yellow}%~%f %F{green}${vcs_info_msg_0_}%f%% " # For tramp (emacs). if [ "$TERM" = "dumb" ]; then |