diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb index a3527bc94c..13395a8c20 100644 --- a/Library/Homebrew/cmd/commands.rb +++ b/Library/Homebrew/cmd/commands.rb @@ -52,7 +52,10 @@ module Homebrew def find_internal_commands(directory) directory.children.each_with_object([]) do |f, cmds| - cmds << f.basename.to_s.sub(/\.(?:rb|sh)$/, "") if f.file? + if f.file? + next if f.basename.to_s =~ /^\./ + cmds << f.basename.to_s.sub(/\.(?:rb|sh)$/, "") + end end end end