base but still broken git

This commit is contained in:
Andrew Tomaka 2015-12-10 15:46:53 -05:00
parent 29dddbf605
commit db3bfa4036

View file

@ -10,7 +10,7 @@ function prompt_pwd {
} }
function prompt_userhost { function prompt_userhost {
eval PR_USER='%F{green}%n%f' eval PR_USER="%F{green}%n%f"
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
eval PR_HOST='%F{yellow}%M%f' #SSH eval PR_HOST='%F{yellow}%M%f' #SSH
else else
@ -36,7 +36,7 @@ function prompt_vcs {
local unstaged_format="%F{green}*%f" local unstaged_format="%F{green}*%f"
local staged_format="%F{yellow}*%f" local staged_format="%F{yellow}*%f"
zstyle ':vcs_info:*' enable bzr git hg svn zstyle ':vcs_info:*' enable git hg svn
zstyle ':vcs_info:*:prompt:*' check-for-changes true zstyle ':vcs_info:*:prompt:*' check-for-changes true
zstyle ':vcs_info:*:prompt:*' unstagedstr "${unstaged_format}" zstyle ':vcs_info:*:prompt:*' unstagedstr "${unstaged_format}"
zstyle ':vcs_info:*:prompt:*' stagedstr "${staged_format}" zstyle ':vcs_info:*:prompt:*' stagedstr "${staged_format}"
@ -50,7 +50,6 @@ function prompt_vcs {
function prompt_precmd { function prompt_precmd {
setopt LOCAL_OPTIONS setopt LOCAL_OPTIONS
unsetopt XTRACE KSH_ARRAYS unsetopt XTRACE KSH_ARRAYS
setopt prompt_subst
# Format PWD. # Format PWD.
prompt_pwd prompt_pwd
@ -93,12 +92,11 @@ function prompt_setup {
local user_host=$_prompt_userhost local user_host=$_prompt_userhost
local ruby_info=$_prompt_ruby local ruby_info=$_prompt_ruby
local git_info=$_prompt_vcs local git_info=$_prompt_vcs
local PR_PROMPT="%(?.%F{green}->.%F{red}-%B${return_code}%b%F{red}->%{%})%f" local PR_PROMPT="%(?.%F{green}->.%F{red}-%B${return_code}%b%F{red}->%{%})%f"
PROMPT="${current_time} ${user_host} ${current_dir} ${ruby_info} ${git_info} PROMPT="${current_time} ${user_host} ${current_dir} ${ruby_info} ${git_info}
|$PR_PROMPT " |$PR_PROMPT "
} }
precmd () { vcs_info }
prompt_setup "$@" prompt_setup "$@"