From a4ebda3fc486e03940e4792e7478a41aada98852 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 1 Oct 2016 18:25:16 +0100 Subject: help: support `#:` help in external commands. Fixes https://github.com/Homebrew/homebrew-test-bot/issues/3 --- Library/Homebrew/cmd/help.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/cmd/help.rb') 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). -- cgit v1.2.3