Sha256: ee1cb96789f3d099f54dabeacc4daea6cd0fd3ab8045dc11c93319af65dd318d

Contents?: true

Size: 356 Bytes

Versions: 6

Compression:

Stored size: 356 Bytes

Contents

require 'thor'

module Tapp
  class Command < Thor
    desc 'grep [<git-grep-options>]', 'Print lines using tapp'
    def grep(*)
      opts = ['--word-regexp', '-e', 'tapp', '-e', 'taputs', '-e', 'taap', *ARGV.drop(1)]
      git_grep = ['git', 'grep', opts].flatten.join(' ')
      puts `#{git_grep}`.gsub(/^Gemfile(\.lock)?:.+?\n/, '')
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tapp-1.5.1 lib/tapp/command.rb
tapp-1.5.0 lib/tapp/command.rb
tapp-1.4.1 lib/tapp/command.rb
tapp-1.5.0.rc lib/tapp/command.rb
tapp-1.4.0 lib/tapp/command.rb
tapp-1.3.1 lib/tapp/command.rb