<commit_before># This plugin forces all commands to be wrapped by an OptionCommand.
# This is useful when wanting to use the option_command_filters plugin on non-option commands.
# This plugins only affects commands from commandline.
module AllOptionCommands
  def self.append_features(mod)
    super if Boson.const_defined?(:BinRunner)
  end

  def self.after_included
    ::Boson::Command.module_eval do
      class <<self
        alias_method :_new_options, :new_options
        def new_options(name, library)
          opts = _new_options(name, library)
          !opts.key?(:render_options) && !opts.key?(:options) ?
            opts.merge!(:global_options=>true) : opts
        end
      end
    end
  end
end
<commit_msg>plugin tweak<commit_after># This plugin forces all commands to be wrapped by an OptionCommand.
# This is useful when wanting to use the option_command_filters plugin on non-option commands.
# This plugins only affects commands from commandline.
module AllOptionCommands
  def self.append_features(mod)
    super if Boson.const_defined?(:BinRunner)
  end

  def self.after_included
    ::Boson::Command.module_eval do
      class <<self
        alias_method :_new_options, :new_options
        def new_options(name, library)
          opts = _new_options(name, library)
          # commandifying all cmds causes rendering issues with ur
          [name, opts[:alias]].include?(BinRunner.command) && !opts.key?(:render_options) &&
           !opts.key?(:options) ? opts.merge!(:global_options=>true) : opts
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.08391608391608392, 'fraction_numerical': 0.0, 'mean_word_length': 3.3123287671232875, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '2762769', 'n_tokens_mistral': 448, 'n_tokens_neox': 445, 'n_words': 139}