<commit_before>module Nehm
  class HelpCommand < Command

    SPACES_BTWN_NAME_AND_DESC = 3

    def execute
      command_name = options[:args].pop
      if command_name.nil?
        UI.say HELP
        UI.term
      end

      @cmd = CommandManager.find_command(command_name)

      show_usage
      show_summary
      show_arguments unless @cmd.arguments.empty?
      show_options unless @cmd.options.empty?
    end

    def arguments
      { 'COMMAND' => 'name of command to show help' }
    end

    def program_name
      'nehm help'
    end

    def summary
      'Show help for specified command'
    end

    def usage
      "#{program_name} COMMAND"
    end

    private

    def find_longest_name(names)
      names.inject do |longest, word|
        word.length > longest.length ? word : longest
      end
    end

    def show_usage
      UI.say "#{'Usage:'.yellow} #{@cmd.usage}"
    end<commit_msg>Add a tip to description of argument in 'help' command<commit_after>module Nehm
  class HelpCommand < Command

    SPACES_BTWN_NAME_AND_DESC = 3

    def execute
      command_name = options[:args].pop
      if command_name.nil?
        UI.say HELP
        UI.term
      end

      @cmd = CommandManager.find_command(command_name)

      show_usage
      show_summary
      show_arguments unless @cmd.arguments.empty?
      show_options unless @cmd.options.empty?
    end

    def arguments
      { 'COMMAND' => 'name of command (can be abbreviated) to show help' }
    end

    def program_name
      'nehm help'
    end

    def summary
      'Show help for specified command'
    end

    def usage
      "#{program_name} COMMAND"
    end

    private

    def find_longest_name(names)
      names.inject do |longest, word|
        word.length > longest.length ? word : longest
      end
    end

    def show_usage
      UI.say "#{'Usage:'.yellow} #{@cmd.usage}"
    end
{'fraction_non_alphanumeric': 0.07635206786850478, 'fraction_numerical': 0.0010604453870625664, 'mean_word_length': 2.18212478920742, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '226240', 'n_tokens_mistral': 598, 'n_tokens_neox': 566, 'n_words': 161}