lib/bundle_grep.rb
def exec(command, args)
    # TODO: could just shell out to `bundle list --paths` instead?
    paths = with_captured_stdout {
      Bundler::CLI::List.new("paths" => true).run
    }.lines.map(&:strip)
    cmd = "grep --color -r #{args.join(' ')} #{paths.join(' ')}"
    system(cmd)
  end
# Register this class as a handler for the `bundle_grep` command
Register this class as a handler for the `bundle_grep` command
Register this class as a handler for the ` bundle_grep ` command
def exec(command, args)
    paths = with_captured_stdout {
      Bundler::CLI::List.new("paths" => true).run
    }.lines.map(&:strip)
    cmd = "grep --color -r #{args.join(' ')} #{paths.join(' ')}"
    system(cmd)
  end
def exec ( command , args ) paths = with_captured_stdout { Bundler :: CLI :: List . new ( "paths" => true ) . run } . lines . map ( & :strip ) cmd = "grep --color -r #{args.join(' ')} #{paths.join(' ')}" system ( cmd ) end
Register this class as a handler for the `bundle_grep` command
Register this class as a handler for the ` bundle_grep ` command
# TODO: could just shell out to `bundle list --paths` instead?
command
args