aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAdam Vandenberg2010-07-29 08:40:22 -0700
committerAdam Vandenberg2010-07-29 08:40:22 -0700
commitd458df709dabeab9c575207943466c60f618b838 (patch)
tree381533d5d3adea1ddd4c662622df3f5b952e59e6 /bin
parentfb42d7a4eb89bc201ff34704474f21233fe5c9a9 (diff)
downloadhomebrew-d458df709dabeab9c575207943466c60f618b838.tar.bz2
Add name to brew info url and remove external script
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/brew b/bin/brew
index 50be3fbe9..cd498fa6e 100755
--- a/bin/brew
+++ b/bin/brew
@@ -241,7 +241,14 @@ begin
puts `ls #{HOMEBREW_CELLAR} | wc -l`.strip+" kegs, "+HOMEBREW_CELLAR.abv
end
elsif ARGV[0][0..6] == 'http://'
- puts Pathname.new(ARGV.shift).version
+ path = Pathname.new(ARGV.shift)
+ /(.*?)[-_.]?#{path.version}/.match path.basename
+ unless $1.to_s.empty?
+ name = $1
+ else
+ name = path.stem
+ end
+ puts "#{name} #{path.version}"
else
ARGV.formulae.each{ |f| info f }
end