<commit_before>Basil.respond_to(/^(echo|say) (.*)/) {

  says @match_data[2].strip.sub(/^basil\s+is\b/i, 'I am')

}.description = "echos what it's told"<commit_msg>echo gets command substitution<commit_after># says will be a little cute with "I am"
Basil.respond_to(/^say (.*)/) {

  says @match_data[1].strip.sub(/^basil\s+is\b/i, 'I am')

}.description = "says what it's told"

# echo is more programmer-friendly and has command substitution
Basil.respond_to(/^echo (.*)/) {

  msg = @match_data[1].strip

  # neat part is it'll do it recursively.
  while msg =~ /(.*)\$\((.*)\)(.*)/
    prefix = $1
    suffix = $3
    result = Basil.dispatch(Basil::Message.new(Basil::Config.me, nil, nil, $2)).text
    msg    = "#{prefix}#{result}#{suffix}"
  end

  says msg

}.description = "says what it's told"
{'fraction_non_alphanumeric': 0.19950124688279303, 'fraction_numerical': 0.007481296758104738, 'mean_word_length': 3.6416184971098264, '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': '4069345', 'n_tokens_mistral': 315, 'n_tokens_neox': 301, 'n_words': 71}