aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/help.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-10-01 18:25:16 +0100
committerMike McQuaid2016-10-01 18:25:16 +0100
commita4ebda3fc486e03940e4792e7478a41aada98852 (patch)
tree2b8d54a451a9e4b8481009c7fd47b844b6673e8b /Library/Homebrew/cmd/help.rb
parentcc59e624b05dbe227387c2f359deef6bfade3eb2 (diff)
downloadbrew-a4ebda3fc486e03940e4792e7478a41aada98852.tar.bz2
help: support `#:` help in external commands.
Fixes https://github.com/Homebrew/homebrew-test-bot/issues/3
Diffstat (limited to 'Library/Homebrew/cmd/help.rb')
-rw-r--r--Library/Homebrew/cmd/help.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb
index 2a814b90b..200e68738 100644
--- a/Library/Homebrew/cmd/help.rb
+++ b/Library/Homebrew/cmd/help.rb
@@ -39,6 +39,8 @@ module Homebrew
if cmd
cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd)
path = Commands.path(cmd)
+ path ||= which("brew-#{cmd}")
+ path ||= which("brew-#{cmd}.rb")
end
# Display command-specific (or generic) help in response to `UsageError`.
@@ -61,7 +63,7 @@ module Homebrew
exit 0
end
- # Resume execution in `brew.rb` for external/unknown commands.
+ # Resume execution in `brew.rb` for unknown commands.
return if path.nil?
# Display help for internal command (or generic help if undocumented).