dotfiles/zshrc

112 lines
2.9 KiB
Bash
Raw Normal View History

2012-11-05 03:36:12 +00:00
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.zsh
setopt promptsubst
autoload -U promptinit
promptinit
prompt grb
autoload -U compinit
compinit
2013-07-07 21:25:47 +00:00
# Never know when you're gonna need to popd!
setopt AUTO_PUSHD
2012-11-05 03:36:12 +00:00
2013-07-07 21:25:47 +00:00
# Allow completing of the remainder of a command
bindkey "^N" insert-last-word
2012-11-05 03:36:12 +00:00
2013-07-07 21:25:47 +00:00
# Show contents of directory after cd-ing into it
chpwd() {
ls -lrthG
}
2012-11-05 03:36:12 +00:00
# Unbreak broken, non-colored terminal
2013-03-20 16:50:02 +00:00
export TERM=xterm-256color
2013-07-07 21:25:47 +00:00
# Grep tweaks
export GREP_OPTIONS="-nRi --color --exclude-dir=tmp" # --exclude-dir=public --exclude-dir=log --exclude-dir=vendor/assets --exclude-dir=fonts --exclude-dir=images --exclude-dir=coverage --exclude-dir=rdoc"
# Save a ton of history
export HISTSIZE=20000
2012-11-05 03:36:12 +00:00
export HISTFILE="$HOME/.history"
export SAVEHIST=$HISTSIZE
2013-07-07 21:25:47 +00:00
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# 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 red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Source my custom files after oh-my-zsh so I can override things.
source $HOME/.dotfiles/zsh/aliases
source $HOME/.dotfiles/zsh/functions
# Customize to your needs...
export PATH=/usr/local/sbin:/usr/local/bin:${PATH}
PATH=$PATH:$HOME/bin
PATH="/usr/local/heroku/bin:$PATH"
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
2013-04-04 18:37:38 +00:00
2012-11-05 03:36:12 +00:00
# Alias
2013-04-04 18:37:38 +00:00
alias ls='ls -G'
alias ll='ls -lG'
alias l='ls -laG'
alias duh='du -csh'
2012-11-05 03:36:12 +00:00
alias r=rails
alias g=git
2012-11-13 17:05:37 +00:00
alias gco='git co'
2012-11-09 00:12:10 +00:00
alias gst='git st'
alias gci='git ci'
2013-02-03 21:55:05 +00:00
alias gpff='git pff'
2012-11-12 19:55:25 +00:00
alias gp='git push'
2012-11-09 00:12:10 +00:00
alias gpom='git push origin master'
alias gf='git fetch'
alias gaa='git add --all'
2013-02-03 21:55:05 +00:00
alias ga='git add --update'
alias gr='git reset'
alias grh='git reset --hard'
2012-11-12 19:55:25 +00:00
alias gl="!source ~/.githelpers && pretty_git_log"
2012-11-09 00:12:10 +00:00
alias gdc='git diff --cached'
alias gam='git commit --amend'
2012-11-12 19:55:25 +00:00
alias gre='git remote'
2012-11-05 03:36:12 +00:00
alias cls=clear
alias history='fc -l 1'
alias cd-='cd -'
2012-11-05 03:36:12 +00:00
alias ..='cd ../'
alias ...='cd ../..'
alias cd..='cd ..'
alias cd...='cd ../..'
alias cd....='cd ../../..'
alias cd.....='cd ../../../..'
alias cd/='cd /'
# easier reload
alias reload='source ~/.zshrc'
2013-07-07 21:25:47 +00:00
alias beg='bundle exec guard'
2012-11-05 03:36:12 +00:00
# Misc
activate_virtualenv() {
if [ -f env/bin/activate ]; then . env/bin/activate;
elif [ -f ../env/bin/activate ]; then . ../env/bin/activate;
elif [ -f ../../env/bin/activate ]; then . ../../env/bin/activate;
elif [ -f ../../../env/bin/activate ]; then . ../../../env/bin/activate;
fi
}
### Added by the Heroku Toolbelt
2013-02-03 21:42:04 +00:00
2013-07-07 21:25:47 +00:00
# Shaves about 0.5s off Rails boot time (when using perf patch). Taken from https://gist.github.com/1688857
export RUBY_HEAP_MIN_SLOTS=1000000
export RUBY_HEAP_SLOTS_INCREMENT=1000000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=1000000000
export RUBY_HEAP_FREE_MIN=500000