cli

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputFormatSimple = OutputFormat("simple")
	OutputFormatCmd    = OutputFormat("cmd")
	OutputFormatYaml   = OutputFormat("yaml")
)

Variables

View Source
var OutputFormatToFunc = map[OutputFormat](func([]config.Alias) (string, error)){
	OutputFormatSimple: simpleOutput,
	OutputFormatCmd:    cmdOutput,
	OutputFormatYaml:   yamlOutput,
}

Functions

func ListNextParts

func ListNextParts(aliases []config.Alias, parts []string) []string

Given a list of alias name parts, return a list of valid next parts. Example:

my:
  aliases:
    one: cmd1
    two: cmd2

ListNextParts([]string{"my"}) -> []string{"aliases"} ListNextParts([]string{"my", "aliases"}) -> []string{"cmd1", "cmd2"}

Types

type OutputFormat added in v0.0.7

type OutputFormat string

func AllOutputFormats added in v0.0.7

func AllOutputFormats() []OutputFormat

func (*OutputFormat) Set added in v0.0.7

func (o *OutputFormat) Set(v string) error

func (*OutputFormat) String added in v0.0.7

func (o *OutputFormat) String() string

func (*OutputFormat) Type added in v0.0.7

func (o *OutputFormat) Type() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL