Browse Source

Fix prompt for reals

master
Taylor Bockman 9 years ago
parent
commit
07e8d90d8b
  1. 16
      dotfiles/zshrc

16
dotfiles/zshrc

@ -7,17 +7,20 @@ export EDITOR="$VISUAL"
export TERM=xterm-256color export TERM=xterm-256color
parse_git_branch() { parse_git_branch() {
ref=$(git symbolic-ref HEAD 2> /dev/null | cut -d'/' -f3) git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
if [ -n "$ref" ]; then echo "%{$fg[white]%}[%{$fg[cyan]%}$ref%{$fg[white]%}]"; fi
} }
HISTFILE=~/.histfile HISTFILE=~/.histfile
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=10000
autoload -U colors && colors
autoload -U promptinit autoload -U promptinit
autoload -U compinit && compinit autoload -U compinit && compinit
autoload -Uz vcs_info
zstyle ':completion:*' menu select zstyle ':completion:*' menu select
zstyle ':vcs_info:git*' formats "%{$fg[white]%}[%{$reset_color%}%{$fg[blue]%}%b%{$fg[white]%}]%{$reset_color%} %a"
promptinit promptinit
plugins=(git brew npm coffee) plugins=(git brew npm coffee)
@ -34,14 +37,17 @@ export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
PATH=$PATH:~/.cabal/bin PATH=$PATH:~/.cabal/bin
PATH=$PATH:.cabal-sandbox/bin PATH=$PATH:.cabal-sandbox/bin
precmd(){
vcs_info
}
# Set up colors
autoload -U colors && colors
# Set up custom prompt # Set up custom prompt
setopt PROMPT_SUBST setopt PROMPT_SUBST
RPROMPT="$(parse_git_branch)%{$reset_color%}" RPROMPT="%{$fg[white]%}\${vcs_info_msg_0_}%{$reset_color%}"
PROMPT="%{$fg[white]%}┌%{$reset_color%}[%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}]─[%{$fg[green]%}%d%{$reset_color%}] PROMPT="%{$fg[white]%}┌%{$reset_color%}[%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}]─[%{$fg[green]%}%d%{$reset_color%}]
%{$fg[white]%}└─╼%{$reset_color%} " %{$fg[white]%}└─╼%{$reset_color%} "

Loading…
Cancel
Save