Skip to content

Instantly share code, notes, and snippets.

@s-mage
Created August 26, 2014 17:10
Show Gist options
  • Save s-mage/60e6a39f88062cf2a009 to your computer and use it in GitHub Desktop.
Save s-mage/60e6a39f88062cf2a009 to your computer and use it in GitHub Desktop.
def vim(*args)
if self.class == Rush::Dir
system "cd #{full_path}; vim +NERDTree"
else
super
end
end
alias_method :v, :vim
def ruby(*args); open_with :ruby, *args; end
def pry(*args); open_with :pry, *args; end
def rails(*args); open_with :rails, *args; end
alias_method :r, :rails
def rs; rails :s; end
def rc; rails :c; end
def rg; rails :g; end
def rspec(*args); open_with :rspec, *args; end
alias_method :s, :rspec
# bundle aliases.
def bundle(*args); open_with :bundle, *args; end
def bi(*args); bundle :install, *args; end
def bu(*args); bundle :update, *args; end
def be(*args); bundle :exec, *args; end
# git aliases.
def gb(*args); git :branch, *args; end
def gp(*args); git :pull, *args; end
def gps(*args); git :push, *args; end
def gad(*args); git :add, *args; end
def gs(*args); git :status, *args; end
def gco(*args); git :checkout, *args; end
def gc(*args)
if Integer === args.first && String === args[1]
git :commit, "[refs ##{args.first}] #{args[1]}"
else
git :commit, *args
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment