You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: repl.go
    path of file: ./repos/evans/repl
    
    the code of the file until where you have to start completion: // Package repl provides a REPL environment for REPL mode.
package repl

import (
	"context"
	"fmt"
	"io"
	"os"
	"path/filepath"
	"sort"
	"strconv"
	"strings"

	"github.com/hashicorp/go-multierror"
	"github.com/ktr0731/evans/config"
	"github.com/ktr0731/evans/cui"
	"github.com/ktr0731/evans/prompt"
	"github.com/ktr0731/evans/usecase"
	"github.com/ktr0731/go-shellstring"
	"github.com/mitchellh/go-homedir"
	"github.c
    
func (r *REPL) runCommand(cmdName string, args []string) error {
	if cmdName == "help" {
		r.ui.Output(r.helpText())
		return nil
	}

	cmd, ok := r.cmds[cmdName]
	if !ok {
		// Check whether cmdName is an alias for a command.
		if alias, ok := r.aliases[cmdName]; ok {
			cmd = r.cmds[alias]
		} else {
			return errors.New("unknown command")
		}
	}

	if len(args) != 0 {
		if args[0] == "-h" || args[0] == "--help" {
			r.ui.Output(cmd.Help())
			return nil
		}
	}

	fs, ok := cmd.FlagSet()
	if ok {
		if err := fs.Parse(args); err != nil {
			return errors.Wrap(err, "failed to parse args")
		}
		args = fs.Args()
	}
	if err := cmd.Validate(args); err != nil {
		return err
	}
	if err := cmd.Run(r.ui.Writer(), args); err != nil {
		return err
	}

	return nil
}