This commit is contained in:
Adam Vandenberg 2010-01-11 09:07:53 -08:00 committed by Max Howell
parent d62fc63568
commit e97c16f498

View File

@ -38,7 +38,8 @@ end
class Formulary
# Returns all formula names as strings, with or without aliases
def self.names with_aliases=false
everything = (HOMEBREW_REPOSITORY+'Library/Formula').children.map{|f| f.basename('.rb').to_s }
filenames = (HOMEBREW_REPOSITORY+'Library/Formula').children.select {|f| f.to_s =~ /\.rb$/ }
everything = filenames.map{|f| f.basename('.rb').to_s }
everything.push *Formulary.get_aliases.keys if with_aliases
everything.sort
end