Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
a4ebda3f
Commit
a4ebda3f
authored
8 years ago
by
Mike McQuaid
Browse files
Options
Downloads
Patches
Plain Diff
help: support `#:` help in external commands.
Fixes
https://github.com/Homebrew/homebrew-test-bot/issues/3
parent
cc59e624
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/brew.rb
+1
-4
1 addition, 4 deletions
Library/Homebrew/brew.rb
Library/Homebrew/cmd/help.rb
+3
-1
3 additions, 1 deletion
Library/Homebrew/cmd/help.rb
with
4 additions
and
5 deletions
Library/Homebrew/brew.rb
+
1
−
4
View file @
a4ebda3f
...
...
@@ -75,12 +75,9 @@ begin
end
# Usage instructions should be displayed if and only if one of:
# - a help flag is passed AND a
n internal
command is matched
# - a help flag is passed AND a command is matched
# - a help flag is passed AND there is no command specified
# - no arguments are passed
#
# It should never affect external commands so they can handle usage
# arguments themselves.
if
empty_argv
||
help_flag
require
"cmd/help"
Homebrew
.
help
cmd
,
empty_argv:
empty_argv
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/cmd/help.rb
+
3
−
1
View file @
a4ebda3f
...
...
@@ -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).
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment