func (a *App) Commands() *Commands {
	return &a.commands
}
Commands returns the app's commands.
package grumble
import (
	"fmt"
	"io"
	"os"
	"strings"
	"github.com/desertbit/closer/v3"
	shlex "github.com/desertbit/go-shlex"
	"github.com/desertbit/readline"
	"github.com/fatih/color"
)
type App struct {
	closer.Closer
	rl            *readline.Instance
	config        *Config
	commands      Commands
	isShell       bool
	currentPrompt string
	flags   Flags
	flagMap FlagMap
	args Args
	initHook  func(a *App, flags FlagMap) error
	shellHook func(a *App) error
	printHelp        func(a *App, shell bool)
	printCommandHelp func(a *App, cmd *Command, shell bool)
	interruptHandler func(a *App, count int)
	printASCIILogo   func(a *App)
}
func New(c *Config) (a *App) {
	c.SetDefaults()
	err := c.Validate()
	if err != nil {
		panic(err)
	}
	a = &App{
		Closer:           closer.New(),
		config:           c,
		currentPrompt:    c.prompt(),
		flagMap:          make(FlagMap),
		printHelp:        defaultPrintHelp,
		printCommandHelp: defaultPrintCommandHelp,
		interruptHandler: defaultInterruptHandler,
	}
	a.flags.Bool("h", "help", false, "display help")
	a.flags.BoolL("nocolor", false, "disable color output")
	if c.Flags != nil {
		c.Flags(&a.flags)
	}
	return
}
func (a *App) SetPrompt(p string) {
	if !a.config.NoColor {
		p = a.config.PromptColor.Sprint(p)
	}
	a.currentPrompt = p
}
func (a *App) SetDefaultPrompt() {
	a.currentPrompt = a.config.prompt()
}
func (a *App) IsShell() bool {
	return a.isShell
}
func (a *App) Config() *Config {
	return a.config
}