<commit_before># coding: utf-8

# mysh -- MY SHell -- a Ruby/Rails inspired command line shell.

require 'English'
require 'in_array'

require_relative 'mysh/user_input'
require_relative 'mysh/quick'
require_relative 'mysh/expression'
require_relative 'mysh/internal'
require_relative 'mysh/external_ruby'
require_relative 'mysh/shell_variables'
require_relative 'mysh/version'

#The Mysh (MY SHell) module. A container for mysh and its functionality.
module Mysh

  #The actual shell method.
  def self.run
    setup

    while @mysh_running do
      execute_a_command($mysh_exec_host.eval_handlebars(get_command("mysh")))
    end
  end

  #Common initialization tasks.
  def self.setup
    reset_host
    init_input
    @mysh_running = true
  end

  #Execute a single line of input.
  def self.execute_a_command(str)
    try_execute_command(str)

  rescue MiniReadlineEOI
    @mysh_running = false<commit_msg>Fix for issue #15<commit_after># coding: utf-8

# mysh -- MY SHell -- a Ruby/Rails inspired command line shell.

require 'English'
require 'in_array'

require_relative 'mysh/user_input'
require_relative 'mysh/quick'
require_relative 'mysh/expression'
require_relative 'mysh/internal'
require_relative 'mysh/external_ruby'
require_relative 'mysh/shell_variables'
require_relative 'mysh/version'

#The Mysh (MY SHell) module. A container for mysh and its functionality.
module Mysh

  #The actual shell method.
  def self.run
    setup

    while @mysh_running do
      execute_a_command(get_command("mysh"))
    end
  end

  #Common initialization tasks.
  def self.setup
    reset_host
    init_input
    @mysh_running = true
  end

  #Execute a single line of input.
  def self.execute_a_command(str)
    try_execute_command($mysh_exec_host.eval_handlebars(str))

  rescue MiniReadlineEOI
    @mysh_running = false
{'fraction_non_alphanumeric': 0.0783132530120482, 'fraction_numerical': 0.002190580503833516, 'mean_word_length': 4.25, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6758879', 'n_tokens_mistral': 607, 'n_tokens_neox': 597, 'n_words': 162}