diff options
| author | Dominyk Tiller | 2017-10-18 11:34:33 +0100 |
|---|---|---|
| committer | Dominyk Tiller | 2017-10-18 11:44:12 +0100 |
| commit | 2063e0fc523ab780e41ae829c04773fa21827abb (patch) | |
| tree | a8a80a70a58c793eaa10bca4f0b859aab0af3642 /Library/Homebrew/cmd | |
| parent | 270b752f5d9d218bfbed6fe85b6974fa653fb25f (diff) | |
| download | brew-2063e0fc523ab780e41ae829c04773fa21827abb.tar.bz2 | |
commands: filter out dotfiles from output
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/commands.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb index a3527bc94..13395a8c2 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 |
