cli_parser: allow hiding from man page.
This commit is contained in:
		
							parent
							
								
									a10ba20459
								
							
						
					
					
						commit
						1bdcd2001c
					
				@ -5,7 +5,7 @@ require "set"
 | 
			
		||||
module Homebrew
 | 
			
		||||
  module CLI
 | 
			
		||||
    class Parser
 | 
			
		||||
      attr_reader :processed_options
 | 
			
		||||
      attr_reader :processed_options, :hide_from_man_page
 | 
			
		||||
 | 
			
		||||
      def self.parse(args = ARGV, &block)
 | 
			
		||||
        new(&block).parse(args)
 | 
			
		||||
@ -29,6 +29,7 @@ module Homebrew
 | 
			
		||||
        @conflicts = []
 | 
			
		||||
        @processed_options = []
 | 
			
		||||
        @desc_line_length = 43
 | 
			
		||||
        @hide_from_man_page = false
 | 
			
		||||
        instance_eval(&block)
 | 
			
		||||
        post_initialize
 | 
			
		||||
      end
 | 
			
		||||
@ -163,6 +164,10 @@ module Homebrew
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      def hide_from_man_page!
 | 
			
		||||
        @hide_from_man_page = true
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      private
 | 
			
		||||
 | 
			
		||||
      def enable_switch(*names)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user