<commit_before>require 'formula'

class Fish <Formula
  url 'http://downloads.sourceforge.net/project/fish/fish/1.23.1/fish-1.23.1.tar.bz2'
  homepage 'http://fishshell.org/'
  md5 'ead6b7c6cdb21f35a3d4aa1d5fa596f1'

  depends_on 'readline'
  skip_clean 'share/doc'

  def install
    system "./configure", "--prefix=#{prefix}", "--without-xsel"
    system "make install"
  end

  def caveats
    "You will need to add #{HOMEBREW_PREFIX}/bin/fish to /etc/shells\n"+
    "Run `chsh -s #{HOMEBREW_PREFIX}/bin/fish' to make fish your default shell."
  end
end<commit_msg>Before installing, apply an upstream patch that fixes the 5 second freezes problem<commit_after>require 'formula'

class Fish <Formula
  url 'http://downloads.sourceforge.net/project/fish/fish/1.23.1/fish-1.23.1.tar.bz2'
  homepage 'http://fishshell.org/'
  md5 'ead6b7c6cdb21f35a3d4aa1d5fa596f1'

  depends_on 'readline'
  skip_clean 'share/doc'

  def patches
    # Reduces the timeout in select_try() from 5s to 10ms.
    # The old timeout would cause fish to frequently freeze for a 5
    # second period.
    "http://gitorious.org/fish-shell/fish-shell/commit/6b8e7b16f6d4e11e168e3ce2effe2d8f0a53b184.patch"
  end

  def install
    system "./configure", "--prefix=#{prefix}", "--without-xsel"
    system "make install"
  end

  def caveats
    "You will need to add #{HOMEBREW_PREFIX}/bin/fish to /etc/shells\n"+
    "Run `chsh -s #{HOMEBREW_PREFIX}/bin/fish' to make fish your default shell."
  end
end
{'fraction_non_alphanumeric': 0.12525389302640488, 'fraction_numerical': 0.052132701421800945, 'mean_word_length': 3.647798742138365, 'pattern_counts': {'":': 0, '<': 5, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1015542', 'n_tokens_mistral': 589, 'n_tokens_neox': 546, 'n_words': 132}