From 70f575a4f8d8adfd0d3abecc6554bdb628166ebd Mon Sep 17 00:00:00 2001 From: EnricoGuccii Date: Sun, 3 May 2026 02:10:00 +0200 Subject: add: zsh git prompt --- .zshrc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index e51700f..337cff8 100644 --- a/.zshrc +++ b/.zshrc @@ -16,7 +16,18 @@ autoload -Uz bashcompinit && bashcompinit zstyle ':completion:*' menu select zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' -PROMPT='%F{#C9DE95}%n@%m%f %F{#F6D99D}%~%f ' + +autoload -Uz vcs_info + +precmd() { vcs_info } +setopt prompt_subst + +zstyle ':vcs_info:*' enable git +zstyle ':vcs_info:git:*' formats ' (%b%u%c)' +zstyle ':vcs_info:git:*' stagedstr '+' +zstyle ':vcs_info:git:*' unstagedstr '*' + +PROMPT='%F{#C9DE95}%n@%m%f %F{#F6D99D}%3~%f${vcs_info_msg_0_} ' export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced -- cgit v1.2.3