lib/thor/completion/command.rb
# when called by `complete -C <command>`, 3 useless arguments a passed
when called by `complete -C `, 3 useless arguments a passed
when called by ` complete - C ` 3 useless arguments a passed
def completion(*_args)
            if options.bash_setup
              puts "complete -C '#{$PROGRAM_NAME} completion' #{$PROGRAM_NAME}"
              return
            end
            name = options.name || File.basename($PROGRAM_NAME)
            if options.dump
              puts Completion::Introspector.new(self.class, name)
            else
              line = options.line.nil? ? ENV['COMP_LINE'] : "#{name} #{options.line}"
              raise Completion::Error, 'Completion line is not set' if line.nil?
              generator = Completion::Generator.new(self.class, name)
              puts generator.match(line)
            end
          end
def completion ( * _args ) if options . bash_setup puts "complete -C '#{$PROGRAM_NAME} completion' #{$PROGRAM_NAME}" return end name = options . name || File . basename ( $PROGRAM_NAME ) if options . dump puts Completion :: Introspector . new ( self . class , name ) else line = options . line . nil? ? ENV [ 'COMP_LINE' ] : "#{name} #{options.line}" raise Completion :: Error , 'Completion line is not set' if line . nil? generator = Completion :: Generator . new ( self . class , name ) puts generator . match ( line ) end end
when called by `complete -C <command>`, 3 useless arguments a passed
when called by ` complete - C <command > ` 3 useless arguments a passed
_args
<not_specific>