Pass the H option to grep to ALWAYS show the filename

This commit is contained in:
Ryan Bigg 2011-04-08 09:19:30 +10:00
parent 9aebd050f9
commit cbdae476d9
1 changed files with 3 additions and 3 deletions

View File

@ -378,9 +378,9 @@ module Rails
value = "" value = ""
# Specifically double quote for finding 'test_help' # Specifically double quote for finding 'test_help'
command = if double_quote command = if double_quote
"grep -r #{"-P" if perl_regex} \"#{text}\" #{where} | grep -v \.svn" "grep -rH #{"-P" if perl_regex} \"#{text}\" #{where} | grep -v \.svn"
else else
"grep -r #{"-P" if perl_regex} '#{text}' #{where} | grep -v \.svn" "grep -rH #{"-P" if perl_regex} '#{text}' #{where} | grep -v \.svn"
end end
Open3.popen3(command) do |stdin, stdout, stderr| Open3.popen3(command) do |stdin, stdout, stderr|