Skip to content

Instantly share code, notes, and snippets.

@anatolyg
Created April 6, 2011 03:34
Show Gist options
  • Save anatolyg/905089 to your computer and use it in GitHub Desktop.
Save anatolyg/905089 to your computer and use it in GitHub Desktop.
I am using oh-my-zsh
# provides a prompt in the following manner:
# name@machine path [git branch●] »
# where ● == color coded ball based on status of branch
# red means uncommitted, yellow means committed but not not pushed, green means up to date
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{28}●'
zstyle ':vcs_info:*' unstagedstr '%F{11}●'
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r'
zstyle ':vcs_info:*' enable git svn
precmd () {
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
zstyle ':vcs_info:*' formats ' %F{blue}[%F{green}%b%u%F{blue}]'
} else {
zstyle ':vcs_info:*' formats ' %F{blue}[%F{green}%b%u%F{red}●%F{blue}]'
}
vcs_info
}
setopt prompt_subst
PROMPT='%F{cyan}%n@%m %F{yellow}%(!.%1~.%~)${vcs_info_msg_0_}%F{blue} %(?/%F{blue}/%F{red})» %{$reset_color%}'
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set to the name theme to load.
# Look in ~/.oh-my-zsh/themes/
export ZSH_THEME="ageyfman"
# Set to this to use case-sensitive completion
# export CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# export DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# export DISABLE_LS_COLORS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git osx brew)
source $ZSH/oh-my-zsh.sh
export MAVEN_OPTS="-Xms512M -Xmx512M -XX:MaxPermSize=256M"
alias scpresume="rsync -avr --partial --progress --rsh=ssh"
alias treeview="ls -R | grep \":$\" | sed -e 's/:$//' -e 's/[^-][^\/]*\//–/g' -e 's/^/ /' -e 's/-/|/'"
alias storage="ssh 192.168.1.111"
# Customize to your needs...
export PATH=/opt/local/bin:/opt/local/sbin:/Library/PostgreSQL/9.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Applications/Frameworks/groovy/bin:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin:/Applications/Frameworks/scala/bin:/Applications/Frameworks/tomcat:/Applications/Frameworks/node/bin:/Applications/Frameworks/node/lib/node:/usr/local/Cellar/ruby/1.9.2-p136/bin
export PATH=$PATH:/usr/local/sbin
export ZDOTDIR=$HOME/.zsh.d
fpath=(
$ZDOTDIR/functions
${fpath}
)
autoload -U $ZDOTDIR/functions*(:t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment