<commit_before>package cli

import (
	"fmt"
	"os"
	"text/tabwriter"
	"text/template"
)

var helpCommand = Command{
	Name:      "help",
	ShortName: "h",
	Usage:     "Shows a list of commands or help for one command",
	Action: func(c *Context) {
		helpTemplate := `NAME:
  {{.Name}} - {{.Usage}}

USAGE:
  {{.Name}} [global options] command [command options] [arguments...]

VERSION:
  {{.Version}}

COMMANDS:
  {{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}}
  {{end}}
GLOBAL OPTIONS:
  {{range .Flags}}{{.}}
  {{end}}
`

		w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)
		t := template.Must(template.New("help").Parse(helpTemplate))
		t.Execute(w, c.App)
		w.Flush()
	},
}

func showVersion(c *Context) {
	fmt.Printf("%v version %v\n", c.App.Name, c.App.Version)
}<commit_msg>JMS #5: Starting support for subcommand docs<commit_after>package cli

import (
	"fmt"
	"os"
	"text/tabwriter"
	"text/template"
)

var helpCommand = Command{
	Name:      "help",
	ShortName: "h",
	Usage:     "Shows a list of commands or help for one command",
	Action: func(c *Context) {
		args := c.Args()
		if len(args) > 0 {
			showCommandHelp(c)
		} else {
			showAppHelp(c)
		}
	},
}

func showAppHelp(c *Context) {
	helpTemplate := `NAME:
   {{.Name}} - {{.Usage}}

USAGE:
   {{.Name}} [global options] command [command options] [arguments...]

VERSION:
   {{.Version}}

COMMANDS:
   {{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}}
   {{end}}
GLOBAL OPTIONS:
   {{range .Flags}}{{.}}
   {{end}}
`

	w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)
	t := template.Must(template.New("help").Parse(helpTemplate))
	t.Execute(w, c.App)
	w.Flush()
}

func showCommandHelp(c *Context) {
}

func showVersion(c *Context) {
	fmt.Printf("%v version %v\n", c.App.Name, c.App.Version)
}
{'fraction_non_alphanumeric': 0.21701199563794984, 'fraction_numerical': 0.0054525627044711015, 'mean_word_length': 3.7051282051282053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '687406', 'n_tokens_mistral': 748, 'n_tokens_neox': 719, 'n_words': 170}