dotfiles/.config/zsh/prompts/simple-two-line.zsh
2025-01-03 18:31:40 +00:00

17 lines
417 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

autoload -Uz vcs_info
precmd() {
vcs_info
setopt PROMPT_SUBST
if [[ -n "$vcs_info_msg_0_" ]]; then
PROMPT='%F{blue}%~%F{yellow} (${vcs_info_msg_0_})%f'$'\n''%F{magenta} '
else
PROMPT='%F{blue}%~%f'$'\n''%F{magenta} '
fi
print -P ""
}
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git*' formats '%b'
# Simple prompt initialization
autoload -U promptinit; promptinit