20 lines
698 B
Bash
20 lines
698 B
Bash
autoload -Uz add-zsh-hook vcs_info
|
|
setopt prompt_subst
|
|
add-zsh-hook precmd vcs_info
|
|
local return_code="%F{9}%? ↵%{$reset_color%})"
|
|
local user_host="%B%F{9}%n%F{15}@%F{172}%m%f "
|
|
local user_symbol='%(!.#.$)'
|
|
local current_dir="%B%F{2}%~ %f"
|
|
local vcs_info='%F{14}${vcs_info_msg_0_}%f'
|
|
|
|
PS1="╭─${user_host}${current_dir}${vcs_info}${venv_prompt}
|
|
╰─%B${user_symbol}%b "
|
|
RPROMPT="%B${return_code}%b"
|
|
|
|
# Enable checking for (un)staged changes, enabling use of %u and %c
|
|
zstyle ':vcs_info:*' check-for-changes true
|
|
zstyle ':vcs_info:*' unstagedstr ' *%n'
|
|
zstyle ':vcs_info:*' stagedstr ' +'
|
|
zstyle ':vcs_info:git:*' formats '(%b%u%c)'
|
|
zstyle ':vcs_info:git:*' actionformats '(%b|%a%u%c)'
|