blob: 93be0773f9a00c1019319429ff102e706dd0f5d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#echo "Loading prompts..."
# Some simple prompts
#PS1='%n@%m %~ $ '
#PS1='%F{green}%n@%m%f %F{blue}%~ $%f '
# Autoload zsh add-zsh-hook and vcs_info functions (-U autoload w/o substition, -z use zsh style)
autoload -Uz add-zsh-hook vcs_info
# Enable substitution in the prompt.
setopt prompt_subst
# Run vcs_info just before a prompt is displayed (precmd)
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
# Enable checking for (un)staged changes, enabling use of %u and %c
zstyle ':vcs_info:*' check-for-changes true
# Set custom strings for an unstaged vcs repo changes (*) and staged changes (+)
zstyle ':vcs_info:*' unstagedstr ' *'
zstyle ':vcs_info:*' stagedstr ' +'
# Set the format of the Git information for vcs_info
zstyle ':vcs_info:git:*' formats '(%b%u%c)'
zstyle ':vcs_info:git:*' actionformats '(%b|%a%u%c)'
PROMPT='%F{white}[ %n%F{red}@%F{white}%m ] %{$fg_bold[cyan]%}%~%{$reset_color%} ${vcs_info_msg_0_}'$'\n''%(?:%F{green}>%F{white} :%F{red}[%?] >%F{white} )'
#echo "Prompts loaded"
|