Skip to content

Instantly share code, notes, and snippets.

@itsthatguy
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save itsthatguy/9fc7a363cd2f32ece802 to your computer and use it in GitHub Desktop.

Select an option

Save itsthatguy/9fc7a363cd2f32ece802 to your computer and use it in GitHub Desktop.
ZSH + chruby can be a PITA...

ZSH + chruby can be a PITA...

Make sure your ~/.zshenv file does a source ~/.zshrc.

When you need to re-init your .zshrc file you will need to run the following:

$ source ~/.zshenv
# PATH
export MYSCRIPTS="$HOME/.scripts"
export MYBIN="$HOME/bin"
export BIN="/usr/local/bin"
export SBIN="/usr/local/sbin"
export NPM="/usr/local/bin/npm"
export PGPATH="/Applications/Postgres.app/Contents/Versions/9.3/bin"
export HEROKU="/usr/local/heroku/bin"
export PATH=$HEROKU:$NPM:$PGPATH:$MYSCRIPTS:$MYBIN:$BIN:$SBIN:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
# Various Environment Variables
export PGHOST=localhost
export EDITOR="subl -w"
export TERM=xterm-256color
# chruby's autoload is bad, and it should feel bad
if [[ -e /usr/local/share/chruby ]]; then
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
chruby $(cat ~/.ruby-version)
fi
source ~/.zshrc
# Random giglgglglge
alias random_giggle="ruby $HOME/.scripts/random_giggle.rb"
# ZSH Config
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="itg"
plugins=(git osx wd)
source $ZSH/oh-my-zsh.sh
# My Scripts
source "$HOME/.scripts/aliases.sh"
source "$HOME/.scripts/env.sh"
# PERLS
source ~/perl5/perlbrew/etc/bashrc
# MY aliases
alias rake='noglob rake'
alias postgres.start='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start'
alias postgres.stop='pg_ctl -D /usr/local/var/postgres stop -s -m fast'
alias eae="subl ~/.zshenv ~/.zshrc"
alias eax="source ~/.zshenv" # this is REALLY important
# ZSH Configurations
COMPLETION_WAITING_DOTS="true"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment