Permalink
Browse files

Fixes for oh-my-zsh breaking symlinked plugins

  • Loading branch information...
forest committed May 31, 2012
1 parent f9a57f1 commit cbdd4a74cec463667e5f31fed9e5740d78129501
Showing with 61 additions and 5 deletions.
  1. +51 −1 pryrc
  2. +10 −4 zshrc
View
52 pryrc
@@ -1 +1,51 @@
Pry.config.editor = 'mvim -f --nomru -c "au VimLeave * !open -a Terminal"'
def require_without_bundler gem
gem_path = Dir.glob("#{Gem.path.first}/gems/#{gem}*/lib").first
$LOAD_PATH << gem_path
require gem
end
Pry.config.editor = '/usr/local/bin/mvim -f --nomru -c "au VimLeave * !open -a Terminal"'
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
# Toys methods
# See https://gist.github.com/807492
class Array
def self.toy(n=10, &block)
block_given? ? Array.new(n,&block) : Array.new(n) {|i| i+1}
end
end
class Hash
def self.toy(n=10)
Hash[Array.toy(n).zip(Array.toy(n){|c| (96+(c+1)).chr})]
end
end
if defined?(Rails) && Rails.env
require 'logger'
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.clear_active_connections!
class Class
def core_ext
self.instance_methods.map {|m| [m, self.instance_method(m).source_location] }.select {|m| m[1] && m[1][0] =~/activesupport/}.map {|m| m[0]}.sort
end
end
require_without_bundler 'hirb'
# https://github.com/cldwalker/hirb/issues/46#issuecomment-1870823
Pry.config.print = proc do |output, value|
Hirb::View.view_or_page_output(value) || Pry::DEFAULT_PRINT.call(output, value)
end
# https://github.com/pry/pry/wiki/Setting-up-Rails-or-Heroku-to-use-Pry#wiki-rails32up
extend Rails::ConsoleMethods
Hirb.enable
end
View
14 zshrc
@@ -29,8 +29,9 @@ plugins=(h c rails3 git brew cap gem git git-flow github heroku redis-cli rvm my
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
#
# Remove after this pull request is closed
# https://github.com/robbyrussell/oh-my-zsh/pull/1126#issuecomment-5881174
for config_file ($ZSH_CUSTOM/*.zsh(N)) source $config_file
# required by TextMate
# http://manual.macromates.com/en/bundles#setting_lc_ctype
@@ -40,7 +41,7 @@ export LC_CTYPE=en_US.UTF-8
export EDITOR='mvim -f'
export PATH="$HOME/bin:$HOME/.bin:/usr/local/homebrew/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export PATH="$HOME/bin:$HOME/.bin:$HOME/.rvm/bin:/usr/local/homebrew/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export MANPATH="/usr/local/man:/usr/local/mysql/man:/usr/local/git/man:$MANPATH"
export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
export MSGMERGE_PATH="/usr/local/Cellar/gettext/0.18.1.1/bin/msgmerge"
@@ -51,4 +52,9 @@ export MSGMERGE_PATH="/usr/local/Cellar/gettext/0.18.1.1/bin/msgmerge"
# use .localrc for settings specific to one system
[[ -f ~/.localrc ]] && . ~/.localrc
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
# @see http://vim.1045645.n5.nabble.com/MacVim-and-PATH-tt3388705.html#a3392363
# Ensure MacVim has same shell as Terminal
if [[ -a /etc/zshenv ]]; then
sudo mv /etc/zshenv /etc/zprofile
fi

0 comments on commit cbdd4a7

Please sign in to comment.