Skip to content

Commit

Permalink
Switch back back to prezto
Browse files Browse the repository at this point in the history
  • Loading branch information
krisrang committed Mar 20, 2013
1 parent 9037f3e commit bdb042f
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 62 deletions.
4 changes: 4 additions & 0 deletions .aliases
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
unalias rm

alias rm="nocorrect rm"

# Shortcuts
alias c="cd ~/Code"
alias g="git"
Expand Down
13 changes: 7 additions & 6 deletions .gemrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
:benchmark: false
:update_sources: true
:backtrace: false
:bulk_threshold: 1000
:verbose: true
benchmark: false
update_sources: true
backtrace: false
bulk_threshold: 1000
verbose: true
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
3 changes: 1 addition & 2 deletions .zpreztorc
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ zstyle ':prezto:load' pmodule \
'history-substring-search' \
'prompt'

zstyle ':prezto:module:prompt' theme 'peepcode'

zstyle ':prezto:module:prompt' theme 'steeef'
80 changes: 46 additions & 34 deletions .zshrc
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,39 +1,16 @@
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
#
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#

# 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="norm"

# 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 many often would you like to wait 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 red dots to be displayed while waiting for completion
COMPLETION_WAITING_DOTS="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=(autojump brew bundler encode64 extract git github heroku knife nyan osx pow powder rbenv rake screen vagrant history-substring-search)

source $ZSH/oh-my-zsh.sh

unsetopt correct_all
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi

# Determine platform
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
Expand All @@ -56,3 +33,38 @@ elif [[ $platform == 'darwin' ]]; then
source ~/.aliases.darwin
source ~/.exports.darwin
fi

# Set up bundler integration
bundled_commands=(annotate cap capify cucumber foreman guard middleman nanoc rackup rainbows rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails puma zeus knife)

_bundler-installed() {
which bundle > /dev/null 2>&1
}

_within-bundled-project() {
local check_dir=$PWD
while [ $check_dir != "/" ]; do
[ -f "$check_dir/Gemfile" ] && return
check_dir="$(dirname $check_dir)"
done
false
}

_run-with-bundler() {
if _bundler-installed && _within-bundled-project; then
bundle exec $@
else
$@
fi
}

## Main program
for cmd in $bundled_commands; do
eval "function unbundled_$cmd () { $cmd \$@ }"
eval "function bundled_$cmd () { _run-with-bundler $cmd \$@}"
alias $cmd=bundled_$cmd

if which _$cmd > /dev/null 2>&1; then
compdef _$cmd bundled_$cmd=$cmd
fi
done
58 changes: 58 additions & 0 deletions .zshrc.ohmyzsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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="norm"

# 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 many often would you like to wait 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 red dots to be displayed while waiting for completion
COMPLETION_WAITING_DOTS="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=(autojump brew bundler encode64 extract git github heroku knife nyan osx pow powder rbenv rake screen vagrant history-substring-search)

source $ZSH/oh-my-zsh.sh

unsetopt correct_all

platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
platform='linux'
elif [[ "$unamestr" == 'Darwin' ]]; then
platform='darwin'
fi

export PATH=/usr/local/sbin:/usr/local/bin:$PATH

# Load general files
source ~/.aliases
source ~/.exports
source ~/.functions

# Load platform specific files
if [[ $platform == 'linux' ]]; then
source ~/.aliases.linux
elif [[ $platform == 'darwin' ]]; then
source ~/.aliases.darwin
source ~/.exports.darwin
fi
40 changes: 20 additions & 20 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,31 @@ function install {
}

function externals {
# if [ ! -d "${ZDOTDIR:-$HOME}/.zprezto" ]; then
# notice "Installing zprezto"
# git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"

# setopt EXTENDED_GLOB
# for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
# ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
# done
# else
# notice "Updating zprezto"
# cd "${ZDOTDIR:-$HOME}/.zprezto"
# git pull
# cd ~
# fi

if [ ! -d "${ZDOTDIR:-$HOME}/.oh-my-zsh" ]; then
notice "Installing oh-my-zsh"
git clone --recursive git://github.com/robbyrussell/oh-my-zsh.git "${ZDOTDIR:-$HOME}/.oh-my-zsh"
if [ ! -d "${ZDOTDIR:-$HOME}/.zprezto" ]; then
notice "Installing zprezto"
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -nsf "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
else
notice "Updating oh-my-zsh"
cd "${ZDOTDIR:-$HOME}/.oh-my-zsh"
notice "Updating zprezto"
cd "${ZDOTDIR:-$HOME}/.zprezto"
git pull
cd ~
fi

# if [ ! -d "${ZDOTDIR:-$HOME}/.oh-my-zsh" ]; then
# notice "Installing oh-my-zsh"
# git clone --recursive git://github.com/robbyrussell/oh-my-zsh.git "${ZDOTDIR:-$HOME}/.oh-my-zsh"
# else
# notice "Updating oh-my-zsh"
# cd "${ZDOTDIR:-$HOME}/.oh-my-zsh"
# git pull
# cd ~
# fi

notice "Updating externals"
fetch_external ~/.rbenv "git://github.com/sstephenson/rbenv.git"
fetch_external ~/.rbenv/plugins/ruby-build "git://github.com/sstephenson/ruby-build.git"
Expand Down

0 comments on commit bdb042f

Please sign in to comment.