dotfiles/zsh-files/zshrc

84 lines
2.8 KiB
Bash
Raw Normal View History

2013-08-02 00:13:05 -07:00
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="juanghurtado"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment to change how often before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want to disable command autocorrection
# DISABLE_CORRECTION="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Uncomment following line if you want to disable marking untracked files under
# VCS as dirty. This makes repository status check for large repositories much,
# much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
2013-08-02 01:46:36 -07:00
2014-01-26 06:00:01 -08:00
# Powerline!
#. ~/dotfiles/misc-files/powerline/powerline/bindings/zsh/powerline.zsh
# export PYTHONPATH=~/.vim/bundle/powerline:$PYTHONPATH
2014-01-26 06:00:01 -08:00
#
2014-04-24 17:46:34 -07:00
alias vim="~/local/bin/vim"
2014-04-24 21:56:06 -07:00
export PATH=~/local/bin:$PATH
2013-08-02 11:26:14 -07:00
export EDITOR=vim
2014-04-24 23:16:10 -07:00
function branch_prompt {
BRANCH=$(current_branch)
SHA=$(command git rev-parse --short HEAD 2> /dev/null)
if [[ $SHA = $BRANCH ]]; then
echo "$(git_prompt_long_sha)"
else
echo "$(current_branch)$(git_prompt_short_sha)"
fi
}
ZSH_THEME_GIT_PROMPT_AHEAD=" %{$YELLOW%}⇈%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_BEHIND=" %{$YELLOW%}⇊%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_DIVERGED=" %{$YELLOW%}⇅%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED=" %{$YELLOW%}[U]%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_MODIFIED=" %{$RED%}☢%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_UNMERGED=" %{$RED%}⑂%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_DELETED=" %{$RED%}[D]%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}[R]%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}⇶%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED%}☢%{$RESET_COLOR%}"
PROMPT='
2014-05-01 18:06:19 -07:00
%{$fg_bold[green]%}[%n@%m] %{$fg[yellow]%}[%~]%{$reset_color%}
$(in_sandbox) %{$fg[blue]%}>%{$reset_color%} '
2014-04-24 23:16:10 -07:00
RPROMPT='$(git_prompt_ahead)$(parse_git_dirty) $(branch_prompt)%{$reset_color%} %{$reset_color%}'