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

@@ -59,6 +59,7 @@ module Xgrep
@option_parser.parse!(argv)
options.terms = argv # must be after parse!
if options.exclude_pathspec.size > 0 and options.include_pathspec.size == 0
options.pathspec = ['.'] + options.exclude_pathspec
else
@@ -115,11 +116,7 @@ module Xgrep
private
def default_environment
if File.exist?('./.xgrep')
Xgrep::CustomEnv.new
else
Xgrep::SimpleEnv.new
end
Xgrep::SimpleEnv.new
end
end