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
0514e2db
Commit
0514e2db
authored
4 years ago
by
Markus Reiter
Browse files
Options
Downloads
Patches
Plain Diff
Move `command_help_lines` into `Help` module.
parent
8e789901
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/help.rb
+8
-0
8 additions, 0 deletions
Library/Homebrew/help.rb
Library/Homebrew/utils.rb
+0
-7
0 additions, 7 deletions
Library/Homebrew/utils.rb
with
8 additions
and
7 deletions
Library/Homebrew/help.rb
+
8
−
0
View file @
0514e2db
...
@@ -100,6 +100,14 @@ module Homebrew
...
@@ -100,6 +100,14 @@ module Homebrew
cmd_parser
.
generate_help_text
cmd_parser
.
generate_help_text
end
end
def
command_help_lines
(
path
)
path
.
read
.
lines
.
grep
(
/^#:/
)
.
map
{
|
line
|
line
.
slice
(
2
..-
1
).
delete_prefix
(
" "
)
}
end
private_class_method
:command_help_lines
def
comment_help
(
path
)
def
comment_help
(
path
)
# Otherwise read #: lines from the file.
# Otherwise read #: lines from the file.
help_lines
=
command_help_lines
(
path
)
help_lines
=
command_help_lines
(
path
)
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/utils.rb
+
0
−
7
View file @
0514e2db
...
@@ -511,13 +511,6 @@ module Kernel
...
@@ -511,13 +511,6 @@ module Kernel
end
end
end
end
def
command_help_lines
(
path
)
path
.
read
.
lines
.
grep
(
/^#:/
)
.
map
{
|
line
|
line
.
slice
(
2
..-
1
).
delete_prefix
(
" "
)
}
end
def
redact_secrets
(
input
,
secrets
)
def
redact_secrets
(
input
,
secrets
)
secrets
.
compact
secrets
.
compact
.
reduce
(
input
)
{
|
str
,
secret
|
str
.
gsub
secret
,
"******"
}
.
reduce
(
input
)
{
|
str
,
secret
|
str
.
gsub
secret
,
"******"
}
...
...
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