From f57a719180be5ac1a6241702361a2adebc44edca Mon Sep 17 00:00:00 2001 From: Ryan Bates Date: Sat, 2 Jun 2012 14:28:49 -0700 Subject: [PATCH] fixing a couple installation issues --- README.md | 17 ++++++++--------- Rakefile | 5 ++++- oh-my-zsh/custom/{plugins => }/rbates.zsh-theme | 0 zshrc | 8 ++++---- 4 files changed, 16 insertions(+), 14 deletions(-) rename oh-my-zsh/custom/{plugins => }/rbates.zsh-theme (100%) diff --git a/README.md b/README.md index d79568d5d0..ec5d0a3f3a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ These are config files to set up a system the way I like it. It now uses [Oh My ZSH](https://github.com/robbyrussell/oh-my-zsh). If you would like to see my old, custom Bash and ZSH config, check out [this branch](https://github.com/ryanb/dotfiles/tree/custom-bash-zsh) +I am running on Mac OS X, but it will likely work on Linux as well. + ## Installation @@ -15,14 +17,13 @@ rake install After installing, open a new terminal window to see the effects. - -## Environment - -I am running on Mac OS X, but it will likely work on Linux as well. +Feel free to customize the .zshrc file to match your preference. ## Features +Many of the following features are added through the "rbates" Oh My ZSH plugin. + I normally place all of my coding projects in ~/code, so this directory can easily be accessed (and tab completed) with the "c" command. ```terminal @@ -46,8 +47,6 @@ To speed things up, the results are cached in local .rake_tasks~ and .cap_tasks~ If you're using git, you'll notice the current branch name shows up in the prompt while in a git repository. -If there are some shell configuration settings which you want secure or specific to one system, place it into a ~/.localrc file. This will be loaded automatically if it exists. - There are several features enabled in Ruby's irb including history and completion. Many convenience methods are added as well such as "ri" which can be used to get inline documentation in IRB. See irbrc file for details. @@ -63,11 +62,11 @@ unlink ~/.gvimrc unlink ~/.irbrc unlink ~/.vim unlink ~/.vimrc -unlink ~/.zshrc -rm ~/.gitconfig # careful here +rm ~/.zshrc # careful here +rm ~/.gitconfig rm -rf ~/.dotfiles rm -rf ~/.oh-my-zsh -chsh -s `which bash` # change back to Bash if you want +chsh -s /bin/bash # change back to Bash if you want ``` Then open a new terminal window to see the effects. diff --git a/Rakefile b/Rakefile index e7d2128103..b97f50122a 100644 --- a/Rakefile +++ b/Rakefile @@ -3,8 +3,8 @@ require 'erb' desc "install the dot files into user's home directory" task :install do - switch_to_zsh install_oh_my_zsh + switch_to_zsh replace_all = false files = Dir['*'] - %w[Rakefile README.rdoc LICENSE oh-my-zsh] files << "oh-my-zsh/custom/plugins/rbates" @@ -47,6 +47,9 @@ def link_file(file) File.open(File.join(ENV['HOME'], ".#{file.sub('.erb', '')}"), 'w') do |new_file| new_file.write ERB.new(File.read(file)).result(binding) end + elsif file =~ /zshrc$/ # copy zshrc instead of link + puts "copying ~/.#{file}" + system %Q{cp "$PWD/#{file}" "$HOME/.#{file}"} else puts "linking ~/.#{file}" system %Q{ln -s "$PWD/#{file}" "$HOME/.#{file}"} diff --git a/oh-my-zsh/custom/plugins/rbates.zsh-theme b/oh-my-zsh/custom/rbates.zsh-theme similarity index 100% rename from oh-my-zsh/custom/plugins/rbates.zsh-theme rename to oh-my-zsh/custom/rbates.zsh-theme diff --git a/zshrc b/zshrc index ea3864510b..21c0929b50 100644 --- a/zshrc +++ b/zshrc @@ -3,11 +3,11 @@ ZSH_THEME="rbates" DISABLE_AUTO_UPDATE="true" DISABLE_LS_COLORS="true" -plugins=(git bundler brew gem rbenv rbates) +plugins=(git brew gem rbates) source $ZSH/oh-my-zsh.sh -export PATH="$HOME/.bin:/usr/local/bin:$PATH" +# for Homebrew installed rbenv +if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi -# use .localrc for settings specific to one system -[[ -f ~/.localrc ]] && . ~/.localrc +export PATH="$HOME/.bin:/usr/local/bin:$PATH"