<commit_before>package core

import (
	"fmt"
	"github.com/peterh/liner"
	"log"
	"os"
	"strings"
)

type Command struct {
	verbs   []string
	help    string
	handler func(args []string)
}

// inits the cmd subsystem
func initCmd() {
	commandMap = make(map[string]Command)
	commandSet = make(map[string]Command)
	registerBaseCommands()
}

// exits the cmd line
func exitCmd() error {
	replActive = false
	err := os.Stdin.Close()
	if err != nil {
		fmt.Println("close error", err)
	}
	if reading {
		fmt.Println("Press any key...")
	}
	return repl.Close()
}

// stores the loaded commands, sorted by verb.
// multiple verbs may point to the same command.
var commandMap map[string]Command

// stores the loaded commands, sorted by first verb
var commandSet map[string]Command<commit_msg>at least it doesn't screw up the terminal anymore<commit_after>package core

import (
	"fmt"
	"github.com/peterh/liner"
	"log"
	"os"
	"strings"
)

type Command struct {
	verbs   []string
	help    string
	handler func(args []string)
}

// inits the cmd subsystem
func initCmd() {
	commandMap = make(map[string]Command)
	commandSet = make(map[string]Command)
	registerBaseCommands()
}

// exits the cmd line
func exitCmd() error {
	replActive = false
	repl.Close()

	if reading {
		fmt.Println("Press enter to continue...")
	}
	err := os.Stdin.Close()
	if err != nil {
		fmt.Println("close error", err)
	}
	return nil
}

// stores the loaded commands, sorted by verb.
// multiple verbs may point to the same command.
var commandMap map[string]Command

// stores the loaded commands, sorted by first verb
var commandSet map[string]Command
{'fraction_non_alphanumeric': 0.11681087762669963, 'fraction_numerical': 0.0, 'mean_word_length': 3.891238670694864, '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': '7171826', 'n_tokens_mistral': 553, 'n_tokens_neox': 540, 'n_words': 173}