Change to use sort in regexp_search

parent 88d19b4f
...@@ -160,7 +160,7 @@ def search (pkgName, silent = false) ...@@ -160,7 +160,7 @@ def search (pkgName, silent = false)
end end
def regexp_search(pkgName) def regexp_search(pkgName)
results = Dir["#{CREW_LIB_PATH}packages/*.rb"] \ results = Dir["#{CREW_LIB_PATH}packages/*.rb"].sort \
.select { |f| File.basename(f, '.rb') =~ Regexp.new(pkgName, true) } \ .select { |f| File.basename(f, '.rb') =~ Regexp.new(pkgName, true) } \
.collect { |f| File.basename(f, '.rb') } \ .collect { |f| File.basename(f, '.rb') } \
.each { |f| print_package(f, ARGV[2] == "extra") } .each { |f| print_package(f, ARGV[2] == "extra") }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment