aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/help.rb
diff options
context:
space:
mode:
authorTim D. Smith2016-06-28 08:08:12 -0700
committerTim D. Smith2016-06-29 09:01:36 -0700
commit9b36e8377142241218cb472dcaf64561f70b96e9 (patch)
tree92accd1435f5f2655d93112189489cbba76d6550 /Library/Homebrew/cmd/help.rb
parentbe3d33ea364c735ef36ef2e77ea8915c99daef4a (diff)
downloadbrew-9b36e8377142241218cb472dcaf64561f70b96e9.tar.bz2
Add magic token to hide commands from man page
Closes #402.
Diffstat (limited to 'Library/Homebrew/cmd/help.rb')
-rw-r--r--Library/Homebrew/cmd/help.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb
index 7cb414ca1..ac5fce5b7 100644
--- a/Library/Homebrew/cmd/help.rb
+++ b/Library/Homebrew/cmd/help.rb
@@ -91,8 +91,9 @@ module Homebrew
line.slice(2..-1).
sub(/^ \* /, "#{Tty.highlight}brew#{Tty.reset} ").
gsub(/`(.*?)`/, "#{Tty.highlight}\\1#{Tty.reset}").
- gsub(/<(.*?)>/, "#{Tty.em}\\1#{Tty.reset}")
- end.join
+ gsub(/<(.*?)>/, "#{Tty.em}\\1#{Tty.reset}").
+ gsub("@hide_from_man_page", "")
+ end.join.strip
end
end
end