cli_parser: allow hiding from man page.

This commit is contained in:
Mike McQuaid 2019-01-30 21:34:10 +00:00
parent a10ba20459
commit 1bdcd2001c
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -5,7 +5,7 @@ require "set"
module Homebrew module Homebrew
module CLI module CLI
class Parser class Parser
attr_reader :processed_options attr_reader :processed_options, :hide_from_man_page
def self.parse(args = ARGV, &block) def self.parse(args = ARGV, &block)
new(&block).parse(args) new(&block).parse(args)
@ -29,6 +29,7 @@ module Homebrew
@conflicts = [] @conflicts = []
@processed_options = [] @processed_options = []
@desc_line_length = 43 @desc_line_length = 43
@hide_from_man_page = false
instance_eval(&block) instance_eval(&block)
post_initialize post_initialize
end end
@ -163,6 +164,10 @@ module Homebrew
end end
end end
def hide_from_man_page!
@hide_from_man_page = true
end
private private
def enable_switch(*names) def enable_switch(*names)