#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"