From 366440b5bb3725d4c64881b2881f6a9543cc5955 Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Fri, 18 Sep 2015 23:40:26 +0200 Subject: [PATCH] commands: sort external commands by name Closes Homebrew/homebrew#44125. Signed-off-by: Mike McQuaid --- Library/Homebrew/cmd/commands.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb index 7983f2ee90..30034ec200 100644 --- a/Library/Homebrew/cmd/commands.rb +++ b/Library/Homebrew/cmd/commands.rb @@ -39,6 +39,7 @@ module Homebrew def external_commands paths.flat_map { |p| Dir["#{p}/brew-*"] }. map { |f| File.basename(f, ".rb")[5..-1] }. - reject { |f| f =~ /\./ } + reject { |f| f =~ /\./ }. + sort end end