aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMisty De Meo2012-01-12 21:10:03 -0600
committerMisty De Meo2012-01-13 22:31:55 -0600
commit8d100a0508f201417784553b4738262ccad448cb (patch)
treea3b20ea68bf75bae88937205f0188c7f8e8bd213 /Library/Homebrew/cmd
parent9a774ac0a67c81c6e84084dce2c908eafcd521d9 (diff)
downloadbrew-8d100a0508f201417784553b4738262ccad448cb.tar.bz2
search: return results while parsing
Instead of returning a full list of results after parsing, yield and print each result as it's found for a snappier user experience. Closes Homebrew/homebrew#9576. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/search.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index a51367e18..50ed36b3d 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -29,10 +29,8 @@ module Homebrew extend self
end
if search_results.empty? and not blacklisted? query
- pulls = GitHub.find_pull_requests rx
- unless pulls.empty?
- puts "Open pull requests matching \"#{query}\":", *pulls.map { |p| " #{p}" }
- end
+ puts "No formula found for \"#{query}\". Searching open pull requests..."
+ GitHub.find_pull_requests(rx) { |pull| puts pull }
end
end
end