<commit_before>package cmd

import (
	"fmt"
	"log"

	"github.com/codegangsta/cli"
	"github.com/exercism/cli/api"
	"github.com/exercism/cli/config"
)

const msgExplainFetch = "In order to fetch a specific assignment, call the fetch command with a specific assignment.\n\nexercism fetch ruby matrix"

// List returns the full list of assignments for a given track.
func List(ctx *cli.Context) {
	c, err := config.New(ctx.GlobalString("config"))
	if err != nil {
		log.Fatal(err)
	}
	args := ctx.Args()

	if len(args) != 1 {
		msg := "Usage: exercism list LANGUAGE"
		log.Fatal(msg)
	}

	language := args[0]
	client := api.NewClient(c)
	problems, err := client.List(language)
	if err != nil {
		if err == api.ErrUnknownLanguage {
			log.Fatalf("The requested language '%s' is unknown", language)
		}
		log.Fatal(err)
	}

	for _, p := range problems {
		fmt.Printf("%s\n", p)
	}
	fmt.Printf("\n%s\n\n", msgExplainFetch)
}<commit_msg>Refer to track correctly in user-facing error message<commit_after>package cmd

import (
	"fmt"
	"log"

	"github.com/codegangsta/cli"
	"github.com/exercism/cli/api"
	"github.com/exercism/cli/config"
)

const msgExplainFetch = "In order to fetch a specific assignment, call the fetch command with a specific assignment.\n\nexercism fetch ruby matrix"

// List returns the full list of assignments for a given track.
func List(ctx *cli.Context) {
	c, err := config.New(ctx.GlobalString("config"))
	if err != nil {
		log.Fatal(err)
	}
	args := ctx.Args()

	if len(args) != 1 {
		msg := "Usage: exercism list LANGUAGE"
		log.Fatal(msg)
	}

	language := args[0]
	client := api.NewClient(c)
	problems, err := client.List(language)
	if err != nil {
		if err == api.ErrUnknownLanguage {
			log.Fatalf("There is no track with ID '%s'.", language)
		}
		log.Fatal(err)
	}

	for _, p := range problems {
		fmt.Printf("%s\n", p)
	}
	fmt.Printf("\n%s\n\n", msgExplainFetch)
}
{'fraction_non_alphanumeric': 0.14701216287678476, 'fraction_numerical': 0.0021152829190904283, 'mean_word_length': 3.765743073047859, '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': '3565437', 'n_tokens_mistral': 721, 'n_tokens_neox': 686, 'n_words': 186}