Module: Bard::CLI::Vim
- Defined in:
- lib/bard/cli/vim.rb
Class Method Summary collapse
Class Method Details
.included(mod) ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# File 'lib/bard/cli/vim.rb', line 2 def self.included mod mod.class_eval do desc "vim [branch=master]", "open all files that have changed since master" def vim branch="master" exec "vim -p `(git diff #{branch} --name-only; git ls-files --others --exclude-standard) | grep -v '^app/assets/images/' | grep -v '^app/assets/stylesheets/' | while read f; do [ -f \"$f\" ] && ! file -b \"$f\" | grep -q \"binary\" && echo \"$f\"; done | tac`" end end end |