simplify: support .xgrep file

This commit is contained in:
rkiel
2016-04-29 09:46:44 -04:00
parent 516f9222a6
commit b2e681f7b3
2 changed files with 10 additions and 6 deletions

View File

@@ -2,7 +2,14 @@
require_relative '../lib/xgrep/commander'
commander = Xgrep::Commander.new(ARGV)
if File.exist? './.xgrep'
project_argv = File.read('./.xgrep').split(/\s/).reject { |x| x.strip == "" }
argv = project_argv + ARGV
else
argv = ARGV
end
commander = Xgrep::Commander.new(argv)
if commander.valid?
commander.execute
else