Sha256: 201bec6498da364cff344ff16fa271d0c6cb589c37ccb33517b1f4f79e85c7c8
Contents?: true
Size: 1.04 KB
Versions: 55
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true module GLI module Commands # Help Command Monkeypatch for paginated output class Help < Command def show_help(global_options, options, arguments, out, error) Doing::Pager.paginate = true command_finder = HelpModules::CommandFinder.new(@app, arguments, error) if options[:c] help_output = HelpModules::HelpCompletionFormat.new(@app, command_finder, arguments).format out.puts help_output unless help_output.nil? elsif arguments.empty? || options[:c] Doing::Pager.page HelpModules::GlobalHelpFormat.new(@app, @sorter, @text_wrapping_class).format else name = arguments.shift command = command_finder.find_command(name) unless command.nil? Doing::Pager.page HelpModules::CommandHelpFormat.new( command, @app, @sorter, @synopsis_formatter_class, @text_wrapping_class ).format end end end end end end
Version data entries
55 entries across 55 versions & 1 rubygems