<commit_before>require "yoke/alias"
require "yoke/zsh"
require "yoke/bash"

module Yoke
  class Base
    FILENAME = ".yoke"

    class << self
      def setup
        if %x[echo $SHELL].include?("zsh")
          Yoke::Zsh.setup
        else
          Yoke::Bash.setup
        end
        create_alias_file
      end

      def add(name=nil)
        puts yoke_text

        path = Dir.pwd
        name = name || File.basename(path)
        if Yoke::Alias.add(path, name)
          puts_text("")
          puts_text("Added #{name} as alias for #{path}")
        else
          puts_text("")
          puts_text("The alias with #{name} already exists")
        end
        source_text
        puts end_text
      end

      def remove(name=nil)
        puts yoke_text

        path = Dir.pwd
        name = name || File.basename(path)
        if Yoke::Alias.remove(path, name)
          puts_text("")
          puts_text("Removed #{name} as an alias")
        else
          puts_text("")
          puts_text("The alias with #{name} is does not exist")
        end
        delete_text(name)<commit_msg>Better setup text<commit_after>require "yoke/alias"
require "yoke/zsh"
require "yoke/bash"

module Yoke
  class Base
    FILENAME = ".yoke"

    class << self
      def setup
        puts yoke_text
        puts_text("")
        puts_text("Prepared the shell.")

        if %x[echo $SHELL].include?("zsh")
          Yoke::Zsh.setup
        else
          Yoke::Bash.setup
        end
        create_alias_file

        puts_text("")
        puts_text("Run yoke help to check out the available options.")
        puts_text("")
        puts end_text
      end

      def add(name=nil)
        puts yoke_text

        path = Dir.pwd
        name = name || File.basename(path)
        if Yoke::Alias.add(path, name)
          puts_text("")
          puts_text("Added #{name} as alias for #{path}")
        else
          puts_text("")
          puts_text("The alias with #{name} already exists")
        end
        source_text
        puts end_text
      end

      def remove(name=nil)
        puts yoke_text

        path = Dir.pwd
        name = name || File.basename(path)
        if Yoke::Alias.remove(path, name)
          puts_text("")
          puts_text("Removed #{name} as an alias")
        else
          puts_text("")
          puts_text("The alias with #{name} is does not exist")
        end
        delete_text(name)
{'fraction_non_alphanumeric': 0.10548001648125258, 'fraction_numerical': 0.0, 'mean_word_length': 1.7219730941704037, 'pattern_counts': {'":': 0, '<': 7, '<?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': '757910', 'n_tokens_mistral': 760, 'n_tokens_neox': 770, 'n_words': 194}