builtins

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 69 Imported by: 0

Documentation

Overview

Package builtins provides gbash's shipped command implementations and default registry assembly.

This package is internal implementation detail. External embedders should use gbash.DefaultRegistry and the public commands package instead.

Index

Constants

View Source
const (
	OptionNoValue       = pubcmd.OptionNoValue
	OptionRequiredValue = pubcmd.OptionRequiredValue
	OptionOptionalValue = pubcmd.OptionOptionalValue
)

Variables

View Source
var DefineCommand = pubcmd.DefineCommand
View Source
var ExitCode = pubcmd.ExitCode
View Source
var Exitf = pubcmd.Exitf
View Source
var NewInvocation = pubcmd.NewInvocation
View Source
var NewRegistry = pubcmd.NewRegistry
View Source
var ParseCommandSpec = pubcmd.ParseCommandSpec
View Source
var RenderCommandHelp = pubcmd.RenderCommandHelp
View Source
var RenderCommandVersion = pubcmd.RenderCommandVersion
View Source
var RenderDetailedVersion = pubcmd.RenderDetailedVersion
View Source
var RenderSimpleVersion = pubcmd.RenderSimpleVersion
View Source
var RunCommand = pubcmd.RunCommand

Functions

func DefaultRegistry

func DefaultRegistry() *commands.Registry

func EnsureNetworkCommands

func EnsureNetworkCommands(registry commands.CommandRegistry) error

func NewB2Sum

func NewB2Sum() *checksumSum

func NewMD5Sum

func NewMD5Sum() *checksumSum

func NewSHA1Sum

func NewSHA1Sum() *checksumSum

func NewSHA224Sum

func NewSHA224Sum() *checksumSum

func NewSHA256Sum

func NewSHA256Sum() *checksumSum

func NewSHA384Sum

func NewSHA384Sum() *checksumSum

func NewSHA512Sum

func NewSHA512Sum() *checksumSum

func RenderBashInvocationUsage

func RenderBashInvocationUsage(w io.Writer, cfg BashInvocationConfig) error

func ValidateShellScriptFileData added in v0.0.24

func ValidateShellScriptFileData(path string, data []byte) error

Types

type Arch

type Arch struct{}

func NewArch

func NewArch() *Arch

func (*Arch) Name

func (c *Arch) Name() string

func (*Arch) Run

func (c *Arch) Run(ctx context.Context, inv *Invocation) error

func (*Arch) RunParsed

func (c *Arch) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Arch) Spec

func (c *Arch) Spec() CommandSpec

type ArgSpec

type ArgSpec = pubcmd.ArgSpec

type Base32

type Base32 struct{}

func NewBase32

func NewBase32() *Base32

func (*Base32) Name

func (c *Base32) Name() string

func (*Base32) Run

func (c *Base32) Run(ctx context.Context, inv *Invocation) error

func (*Base32) RunParsed

func (c *Base32) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Base32) Spec

func (c *Base32) Spec() CommandSpec

type Base64

type Base64 struct{}

func NewBase64

func NewBase64() *Base64

func (*Base64) Name

func (c *Base64) Name() string

func (*Base64) Run

func (c *Base64) Run(ctx context.Context, inv *Invocation) error

func (*Base64) RunParsed

func (c *Base64) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Base64) Spec

func (c *Base64) Spec() CommandSpec

type Basename

type Basename struct{}

func NewBasename

func NewBasename() *Basename

func (*Basename) Name

func (c *Basename) Name() string

func (*Basename) Run

func (c *Basename) Run(ctx context.Context, inv *Invocation) error

func (*Basename) RunParsed

func (c *Basename) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Basename) Spec

func (c *Basename) Spec() CommandSpec

type Basenc

type Basenc struct{}

func NewBasenc

func NewBasenc() *Basenc

func (*Basenc) Name

func (c *Basenc) Name() string

func (*Basenc) Run

func (c *Basenc) Run(ctx context.Context, inv *Invocation) error

func (*Basenc) RunParsed

func (c *Basenc) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Basenc) Spec

func (c *Basenc) Spec() CommandSpec

type Bash

type Bash struct {
	// contains filtered or unexported fields
}

func NewBash

func NewBash() *Bash

func NewBats added in v0.0.33

func NewBats() *Bash

func NewDash added in v0.0.33

func NewDash() *Bash

func NewMksh added in v0.0.33

func NewMksh() *Bash

func NewSh

func NewSh() *Bash

func NewZsh added in v0.0.33

func NewZsh() *Bash

func (*Bash) Name

func (c *Bash) Name() string

func (*Bash) Run

func (c *Bash) Run(ctx context.Context, inv *Invocation) error

func (*Bash) RunParsed

func (c *Bash) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Bash) Spec

func (c *Bash) Spec() CommandSpec

type BashInvocation

type BashInvocation struct {
	Name           string
	Action         string
	Interactive    bool
	LoginShell     bool
	NoRc           bool
	NoProfile      bool
	Source         BashSourceMode
	Rcfile         string
	ExecutionName  string
	CommandString  string
	ScriptPath     string
	Args           []string
	StartupOptions []string
	RawArgs        []string
}

func ParseBashInvocation

func ParseBashInvocation(args []string, cfg BashInvocationConfig) (*BashInvocation, error)

func (*BashInvocation) BuildExecutionRequest

func (inv *BashInvocation) BuildExecutionRequest(env map[string]string, cwd string, stdin io.Reader, script string) *ExecutionRequest

func (*BashInvocation) DefaultShellVariant added in v0.0.33

func (inv *BashInvocation) DefaultShellVariant() ShellVariant

type BashInvocationConfig

type BashInvocationConfig struct {
	Name             string
	AllowInteractive bool
	LongInteractive  bool
}

type BashSourceMode

type BashSourceMode int
const (
	BashSourceStdin BashSourceMode = iota
	BashSourceCommandString
	BashSourceFile
)

type CDResolve

type CDResolve struct{}

func NewCDResolve

func NewCDResolve() *CDResolve

func (*CDResolve) Name

func (c *CDResolve) Name() string

func (*CDResolve) Run

func (c *CDResolve) Run(ctx context.Context, inv *Invocation) error

type CP

type CP struct{}

func NewCP

func NewCP() *CP

func (*CP) Name

func (c *CP) Name() string

func (*CP) Run

func (c *CP) Run(ctx context.Context, inv *Invocation) error

func (*CP) RunParsed

func (c *CP) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*CP) Spec

func (c *CP) Spec() CommandSpec

type Cat

type Cat struct{}

func NewCat

func NewCat() *Cat

func (*Cat) Name

func (c *Cat) Name() string

func (*Cat) Run

func (c *Cat) Run(ctx context.Context, inv *Invocation) error

func (*Cat) RunParsed

func (c *Cat) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Cat) Spec

func (c *Cat) Spec() CommandSpec

type Chgrp

type Chgrp struct{}

func NewChgrp

func NewChgrp() *Chgrp

func (*Chgrp) Name

func (c *Chgrp) Name() string

func (*Chgrp) Run

func (c *Chgrp) Run(ctx context.Context, inv *Invocation) error

func (*Chgrp) RunParsed

func (c *Chgrp) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Chgrp) Spec

func (c *Chgrp) Spec() CommandSpec

type Chmod

type Chmod struct{}

func NewChmod

func NewChmod() *Chmod

func (*Chmod) Name

func (c *Chmod) Name() string

func (*Chmod) NormalizeInvocation

func (c *Chmod) NormalizeInvocation(inv *Invocation) *Invocation

func (*Chmod) Run

func (c *Chmod) Run(ctx context.Context, inv *Invocation) error

func (*Chmod) Spec

func (c *Chmod) Spec() CommandSpec

type Chown

type Chown struct{}

func NewChown

func NewChown() *Chown

func (*Chown) Name

func (c *Chown) Name() string

func (*Chown) Run

func (c *Chown) Run(ctx context.Context, inv *Invocation) error

func (*Chown) RunParsed

func (c *Chown) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Chown) Spec

func (c *Chown) Spec() CommandSpec

type Cksum

type Cksum struct{}

func NewCksum

func NewCksum() *Cksum

func (*Cksum) Name

func (c *Cksum) Name() string

func (*Cksum) Run

func (c *Cksum) Run(ctx context.Context, inv *Invocation) error

func (*Cksum) RunParsed

func (c *Cksum) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Cksum) Spec

func (c *Cksum) Spec() CommandSpec

type Clear

type Clear struct{}

func NewClear

func NewClear() *Clear

func (*Clear) Name

func (c *Clear) Name() string

func (*Clear) Run

func (c *Clear) Run(ctx context.Context, inv *Invocation) error

func (*Clear) RunParsed

func (c *Clear) RunParsed(_ context.Context, inv *Invocation, _ *ParsedCommand) error

func (*Clear) Spec

func (c *Clear) Spec() CommandSpec

type Column

type Column struct{}

func NewColumn

func NewColumn() *Column

func (*Column) Name

func (c *Column) Name() string

func (*Column) NormalizeInvocation

func (c *Column) NormalizeInvocation(inv *Invocation) *Invocation

func (*Column) NormalizeParseError

func (c *Column) NormalizeParseError(inv *Invocation, err error) error

func (*Column) Run

func (c *Column) Run(ctx context.Context, inv *Invocation) error

func (*Column) RunParsed

func (c *Column) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Column) Spec

func (c *Column) Spec() CommandSpec

type Comm

type Comm struct{}

func NewComm

func NewComm() *Comm

func (*Comm) Name

func (c *Comm) Name() string

func (*Comm) Run

func (c *Comm) Run(ctx context.Context, inv *Invocation) error

func (*Comm) RunParsed

func (c *Comm) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Comm) Spec

func (c *Comm) Spec() CommandSpec

type Command

type Command = pubcmd.Command

func NewEGrep

func NewEGrep() Command

func NewFGrep

func NewFGrep() Command

type CommandFS

type CommandFS = pubcmd.CommandFS

type CommandFunc

type CommandFunc = pubcmd.CommandFunc

type CommandRegistry

type CommandRegistry = pubcmd.CommandRegistry

type CommandSpec

type CommandSpec = pubcmd.CommandSpec

func BashInvocationSpec

func BashInvocationSpec(cfg BashInvocationConfig) CommandSpec

type Compadjust added in v0.0.23

type Compadjust struct{}

func NewCompadjust added in v0.0.23

func NewCompadjust() *Compadjust

func (*Compadjust) Name added in v0.0.23

func (c *Compadjust) Name() string

func (*Compadjust) Run added in v0.0.23

func (c *Compadjust) Run(ctx context.Context, inv *Invocation) error

type Compgen added in v0.0.23

type Compgen struct{}

func NewCompgen added in v0.0.23

func NewCompgen() *Compgen

func (*Compgen) Name added in v0.0.23

func (c *Compgen) Name() string

func (*Compgen) Run added in v0.0.23

func (c *Compgen) Run(ctx context.Context, inv *Invocation) error

type Complete

type Complete struct{}

func NewComplete

func NewComplete() *Complete

func (*Complete) Name

func (c *Complete) Name() string

func (*Complete) Run

func (c *Complete) Run(ctx context.Context, inv *Invocation) error

type Compopt

type Compopt struct{}

func NewCompopt

func NewCompopt() *Compopt

func (*Compopt) Name

func (c *Compopt) Name() string

func (*Compopt) Run

func (c *Compopt) Run(ctx context.Context, inv *Invocation) error

type Csplit

type Csplit struct{}

func NewCsplit

func NewCsplit() *Csplit

func (*Csplit) Name

func (c *Csplit) Name() string

func (*Csplit) Run

func (c *Csplit) Run(ctx context.Context, inv *Invocation) error

func (*Csplit) RunParsed

func (c *Csplit) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Csplit) Spec

func (c *Csplit) Spec() CommandSpec

type Curl

type Curl struct{}

func NewCurl

func NewCurl() *Curl

func (*Curl) Name

func (c *Curl) Name() string

func (*Curl) NormalizeInvocation

func (c *Curl) NormalizeInvocation(inv *Invocation) *Invocation

func (*Curl) Run

func (c *Curl) Run(ctx context.Context, inv *Invocation) error

func (*Curl) RunParsed

func (c *Curl) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Curl) Spec

func (c *Curl) Spec() CommandSpec

type Cut

type Cut struct{}

func NewCut

func NewCut() *Cut

func (*Cut) Name

func (c *Cut) Name() string

func (*Cut) Run

func (c *Cut) Run(ctx context.Context, inv *Invocation) error

func (*Cut) RunParsed

func (c *Cut) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Cut) Spec

func (c *Cut) Spec() CommandSpec

type DU

type DU struct{}

func NewDU

func NewDU() *DU

func (*DU) Name

func (c *DU) Name() string

func (*DU) Run

func (c *DU) Run(ctx context.Context, inv *Invocation) error

func (*DU) RunParsed

func (c *DU) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*DU) Spec

func (c *DU) Spec() CommandSpec

type Date

type Date struct{}

func NewDate

func NewDate() *Date

func (*Date) Name

func (c *Date) Name() string

func (*Date) Run

func (c *Date) Run(ctx context.Context, inv *Invocation) error

type Dd

type Dd struct{}

func NewDd

func NewDd() *Dd

func (*Dd) Name

func (c *Dd) Name() string

func (*Dd) Run

func (c *Dd) Run(ctx context.Context, inv *Invocation) error

func (*Dd) RunParsed added in v0.0.27

func (c *Dd) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Dd) Spec added in v0.0.27

func (c *Dd) Spec() CommandSpec

type Diff

type Diff struct{}

func NewDiff

func NewDiff() *Diff

func (*Diff) Name

func (c *Diff) Name() string

func (*Diff) Run

func (c *Diff) Run(ctx context.Context, inv *Invocation) error

type Dir

type Dir struct{}

func NewDir

func NewDir() *Dir

func (*Dir) Name

func (c *Dir) Name() string

func (*Dir) NormalizeParseError added in v0.0.32

func (c *Dir) NormalizeParseError(inv *Invocation, err error) error

func (*Dir) Run

func (c *Dir) Run(ctx context.Context, inv *Invocation) error

func (*Dir) RunParsed

func (c *Dir) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Dir) Spec

func (c *Dir) Spec() CommandSpec

type Dircolors

type Dircolors struct{}

func NewDircolors

func NewDircolors() *Dircolors

func (*Dircolors) Name

func (c *Dircolors) Name() string

func (*Dircolors) Run

func (c *Dircolors) Run(ctx context.Context, inv *Invocation) error

func (*Dircolors) RunParsed

func (c *Dircolors) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Dircolors) Spec

func (c *Dircolors) Spec() CommandSpec

type Dirname

type Dirname struct{}

func NewDirname

func NewDirname() *Dirname

func (*Dirname) Name

func (c *Dirname) Name() string

func (*Dirname) Run

func (c *Dirname) Run(ctx context.Context, inv *Invocation) error

func (*Dirname) RunParsed

func (c *Dirname) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Dirname) Spec

func (c *Dirname) Spec() CommandSpec

type Echo

type Echo struct{}

func NewEcho

func NewEcho() *Echo

func (*Echo) Name

func (c *Echo) Name() string

func (*Echo) NormalizeInvocation

func (c *Echo) NormalizeInvocation(inv *Invocation) *Invocation

func (*Echo) Run

func (c *Echo) Run(ctx context.Context, inv *Invocation) error

func (*Echo) RunParsed

func (c *Echo) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Echo) Spec

func (c *Echo) Spec() CommandSpec

type Env

type Env struct{}

func NewEnv

func NewEnv() *Env

func (*Env) Name

func (c *Env) Name() string

func (*Env) Run

func (c *Env) Run(ctx context.Context, inv *Invocation) error

func (*Env) Spec

func (c *Env) Spec() CommandSpec

type ExecutionRequest

type ExecutionRequest = pubcmd.ExecutionRequest

type ExecutionResult

type ExecutionResult = pubcmd.ExecutionResult

type ExitError

type ExitError = pubcmd.ExitError

type Expand

type Expand struct{}

func NewExpand

func NewExpand() *Expand

func (*Expand) Name

func (c *Expand) Name() string

func (*Expand) NormalizeInvocation added in v0.0.26

func (c *Expand) NormalizeInvocation(inv *Invocation) *Invocation

func (*Expand) Run

func (c *Expand) Run(ctx context.Context, inv *Invocation) error

func (*Expand) RunParsed added in v0.0.26

func (c *Expand) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Expand) Spec added in v0.0.26

func (c *Expand) Spec() CommandSpec

type Expr

type Expr struct{}

func NewExpr

func NewExpr() *Expr

func (*Expr) Name

func (c *Expr) Name() string

func (*Expr) Run

func (c *Expr) Run(_ context.Context, inv *Invocation) error

type Factor

type Factor struct{}

func NewFactor

func NewFactor() *Factor

func (*Factor) Name

func (c *Factor) Name() string

func (*Factor) Run

func (c *Factor) Run(ctx context.Context, inv *Invocation) error

func (*Factor) RunParsed

func (c *Factor) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Factor) Spec

func (c *Factor) Spec() CommandSpec

type False

type False struct{}

func NewFalse

func NewFalse() *False

func (*False) Name

func (c *False) Name() string

func (*False) Run

func (c *False) Run(context.Context, *Invocation) error

type FileCmd

type FileCmd struct{}

func NewFile

func NewFile() *FileCmd

func (*FileCmd) Name

func (c *FileCmd) Name() string

func (*FileCmd) Run

func (c *FileCmd) Run(ctx context.Context, inv *Invocation) error

func (*FileCmd) RunParsed

func (c *FileCmd) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*FileCmd) Spec

func (c *FileCmd) Spec() CommandSpec

type Find

type Find struct{}

func NewFind

func NewFind() *Find

func (*Find) Name

func (c *Find) Name() string

func (*Find) NormalizeInvocation

func (c *Find) NormalizeInvocation(inv *Invocation) *Invocation

func (*Find) Run

func (c *Find) Run(ctx context.Context, inv *Invocation) error

func (*Find) RunParsed

func (c *Find) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Find) Spec

func (c *Find) Spec() CommandSpec

type Fmt

type Fmt struct{}

func NewFmt

func NewFmt() *Fmt

func (*Fmt) Name

func (c *Fmt) Name() string

func (*Fmt) Run

func (c *Fmt) Run(ctx context.Context, inv *Invocation) error

type Fold

type Fold struct{}

func NewFold

func NewFold() *Fold

func (*Fold) Name

func (c *Fold) Name() string

func (*Fold) NormalizeInvocation added in v0.0.27

func (c *Fold) NormalizeInvocation(inv *Invocation) *Invocation

func (*Fold) Run

func (c *Fold) Run(ctx context.Context, inv *Invocation) error

func (*Fold) RunParsed added in v0.0.27

func (c *Fold) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Fold) Spec added in v0.0.27

func (c *Fold) Spec() CommandSpec

type Grep

type Grep struct{}

func NewGrep

func NewGrep() *Grep

func (*Grep) Name

func (c *Grep) Name() string

func (*Grep) NormalizeParseError added in v0.0.27

func (c *Grep) NormalizeParseError(inv *Invocation, err error) error

func (*Grep) Run

func (c *Grep) Run(ctx context.Context, inv *Invocation) error

func (*Grep) RunParsed

func (c *Grep) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Grep) Spec

func (c *Grep) Spec() CommandSpec

type Groups

type Groups struct{}

func NewGroups

func NewGroups() *Groups

func (*Groups) Name

func (c *Groups) Name() string

func (*Groups) Run

func (c *Groups) Run(ctx context.Context, inv *Invocation) error

func (*Groups) RunParsed added in v0.0.26

func (c *Groups) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Groups) Spec added in v0.0.26

func (c *Groups) Spec() CommandSpec

type Gzip

type Gzip struct {
	// contains filtered or unexported fields
}

func NewGunzip

func NewGunzip() *Gzip

func NewGzip

func NewGzip() *Gzip

func NewZCat

func NewZCat() *Gzip

func (*Gzip) Name

func (c *Gzip) Name() string

func (*Gzip) Run

func (c *Gzip) Run(ctx context.Context, inv *Invocation) error

func (*Gzip) RunParsed

func (c *Gzip) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Gzip) Spec

func (c *Gzip) Spec() CommandSpec
type Head struct{}

func NewHead

func NewHead() *Head

func (*Head) Name

func (c *Head) Name() string

func (*Head) NormalizeInvocation

func (c *Head) NormalizeInvocation(inv *Invocation) *Invocation

func (*Head) Run

func (c *Head) Run(ctx context.Context, inv *Invocation) error

func (*Head) RunParsed

func (c *Head) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Head) Spec

func (c *Head) Spec() CommandSpec

type Help

type Help struct{}

func NewHelp

func NewHelp() *Help

func (*Help) Name

func (c *Help) Name() string

func (*Help) Run

func (c *Help) Run(ctx context.Context, inv *Invocation) error

type History

type History struct{}

func NewHistory

func NewHistory() *History

func (*History) Name

func (c *History) Name() string

func (*History) NormalizeParseError added in v0.0.24

func (c *History) NormalizeParseError(inv *Invocation, err error) error

func (*History) Run

func (c *History) Run(ctx context.Context, inv *Invocation) error

func (*History) RunParsed

func (c *History) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*History) Spec

func (c *History) Spec() CommandSpec

type Hostid

type Hostid struct{}

func NewHostid

func NewHostid() *Hostid

func (*Hostid) Name

func (c *Hostid) Name() string

func (*Hostid) Run

func (c *Hostid) Run(ctx context.Context, inv *Invocation) error

func (*Hostid) RunParsed added in v0.0.26

func (c *Hostid) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Hostid) Spec added in v0.0.26

func (c *Hostid) Spec() CommandSpec

type Hostname

type Hostname struct{}

func NewHostname

func NewHostname() *Hostname

func (*Hostname) Name

func (c *Hostname) Name() string

func (*Hostname) Run

func (c *Hostname) Run(_ context.Context, inv *Invocation) error

type ID

type ID struct{}

func NewID

func NewID() *ID

func (*ID) Name

func (c *ID) Name() string

func (*ID) Run

func (c *ID) Run(ctx context.Context, inv *Invocation) error

func (*ID) RunParsed

func (c *ID) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*ID) Spec

func (c *ID) Spec() CommandSpec

type Install

type Install struct{}

func NewInstall

func NewInstall() *Install

func (*Install) Name

func (c *Install) Name() string

func (*Install) Run

func (c *Install) Run(ctx context.Context, inv *Invocation) error

func (*Install) RunParsed added in v0.0.27

func (c *Install) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Install) Spec added in v0.0.27

func (c *Install) Spec() CommandSpec

type InteractiveRequest

type InteractiveRequest = pubcmd.InteractiveRequest

type InteractiveResult

type InteractiveResult = pubcmd.InteractiveResult

type Invocation

type Invocation = pubcmd.Invocation

type InvocationOptions

type InvocationOptions = pubcmd.InvocationOptions

type Join

type Join struct{}

func NewJoin

func NewJoin() *Join

func (*Join) Name

func (c *Join) Name() string

func (*Join) Run

func (c *Join) Run(ctx context.Context, inv *Invocation) error

func (*Join) RunParsed

func (c *Join) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Join) Spec

func (c *Join) Spec() CommandSpec

type Kill

type Kill struct{}

func NewKill

func NewKill() *Kill

func (*Kill) Name

func (c *Kill) Name() string

func (*Kill) Run

func (c *Kill) Run(ctx context.Context, inv *Invocation) error

type LN

type LN struct{}

func NewLN

func NewLN() *LN

func (*LN) Name

func (c *LN) Name() string

func (*LN) Run

func (c *LN) Run(ctx context.Context, inv *Invocation) error

func (*LN) RunParsed

func (c *LN) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*LN) Spec

func (c *LN) Spec() CommandSpec

type LS

type LS struct{}

func NewLS

func NewLS() *LS

func (*LS) Name

func (c *LS) Name() string

func (*LS) NormalizeParseError added in v0.0.32

func (c *LS) NormalizeParseError(inv *Invocation, err error) error

func (*LS) Run

func (c *LS) Run(ctx context.Context, inv *Invocation) error

func (*LS) RunParsed

func (c *LS) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*LS) Spec

func (c *LS) Spec() CommandSpec

type LazyCommandLoader

type LazyCommandLoader = pubcmd.LazyCommandLoader

type LegacySpecProvider

type LegacySpecProvider = pubcmd.LegacySpecProvider
type Link struct{}
func NewLink() *Link

func (*Link) Name

func (c *Link) Name() string

func (*Link) Run

func (c *Link) Run(ctx context.Context, inv *Invocation) error

func (*Link) RunParsed

func (c *Link) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Link) Spec

func (c *Link) Spec() CommandSpec

type Logname

type Logname struct{}

func NewLogname

func NewLogname() *Logname

func (*Logname) Name

func (c *Logname) Name() string

func (*Logname) Run

func (c *Logname) Run(ctx context.Context, inv *Invocation) error

func (*Logname) RunParsed added in v0.0.26

func (c *Logname) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Logname) Spec added in v0.0.26

func (c *Logname) Spec() CommandSpec

type MV

type MV struct{}

func NewMV

func NewMV() *MV

func (*MV) Name

func (c *MV) Name() string

func (*MV) Run

func (c *MV) Run(ctx context.Context, inv *Invocation) error

func (*MV) RunParsed

func (c *MV) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*MV) Spec

func (c *MV) Spec() CommandSpec

type Mkdir

type Mkdir struct{}

func NewMkdir

func NewMkdir() *Mkdir

func (*Mkdir) Name

func (c *Mkdir) Name() string

func (*Mkdir) Run

func (c *Mkdir) Run(ctx context.Context, inv *Invocation) error

func (*Mkdir) RunParsed

func (c *Mkdir) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Mkdir) Spec

func (c *Mkdir) Spec() CommandSpec

type Mkfifo added in v0.0.23

type Mkfifo struct{}

func NewMkfifo added in v0.0.23

func NewMkfifo() *Mkfifo

func (*Mkfifo) Name added in v0.0.23

func (c *Mkfifo) Name() string

func (*Mkfifo) Run added in v0.0.23

func (c *Mkfifo) Run(ctx context.Context, inv *Invocation) error

func (*Mkfifo) RunParsed added in v0.0.23

func (c *Mkfifo) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Mkfifo) Spec added in v0.0.23

func (c *Mkfifo) Spec() CommandSpec

type Mktemp

type Mktemp struct{}

func NewMktemp

func NewMktemp() *Mktemp

func (*Mktemp) Name

func (c *Mktemp) Name() string

func (*Mktemp) Run

func (c *Mktemp) Run(ctx context.Context, inv *Invocation) error

func (*Mktemp) RunParsed

func (c *Mktemp) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Mktemp) Spec

func (c *Mktemp) Spec() CommandSpec

type NL

type NL struct{}

func NewNL

func NewNL() *NL

func (*NL) Name

func (c *NL) Name() string

func (*NL) Run

func (c *NL) Run(ctx context.Context, inv *Invocation) error

func (*NL) RunParsed

func (c *NL) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*NL) Spec

func (c *NL) Spec() CommandSpec

type Nproc

type Nproc struct{}

func NewNproc

func NewNproc() *Nproc

func (*Nproc) Name

func (c *Nproc) Name() string

func (*Nproc) Run

func (c *Nproc) Run(ctx context.Context, inv *Invocation) error

func (*Nproc) RunParsed added in v0.0.26

func (c *Nproc) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Nproc) Spec added in v0.0.26

func (c *Nproc) Spec() CommandSpec

type Numfmt

type Numfmt struct{}

func NewNumfmt

func NewNumfmt() *Numfmt

func (*Numfmt) Name

func (c *Numfmt) Name() string

func (*Numfmt) Run

func (c *Numfmt) Run(ctx context.Context, inv *Invocation) error

func (*Numfmt) RunParsed

func (c *Numfmt) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Numfmt) Spec

func (c *Numfmt) Spec() CommandSpec

type OD

type OD struct{}

func NewOD

func NewOD() *OD

func (*OD) Name

func (c *OD) Name() string

func (*OD) Run

func (c *OD) Run(ctx context.Context, inv *Invocation) error

func (*OD) RunParsed

func (c *OD) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*OD) Spec

func (c *OD) Spec() CommandSpec

type OptionArity

type OptionArity = pubcmd.OptionArity

type OptionSpec

type OptionSpec = pubcmd.OptionSpec

type ParseConfig

type ParseConfig = pubcmd.ParseConfig

type ParseErrorNormalizer

type ParseErrorNormalizer = pubcmd.ParseErrorNormalizer

type ParseInvocationNormalizer

type ParseInvocationNormalizer = pubcmd.ParseInvocationNormalizer

type ParsedCommand

type ParsedCommand = pubcmd.ParsedCommand

type ParsedOptionOccurrence added in v0.0.30

type ParsedOptionOccurrence = pubcmd.ParsedOptionOccurrence

type ParsedRunner

type ParsedRunner = pubcmd.ParsedRunner

type Paste

type Paste struct{}

func NewPaste

func NewPaste() *Paste

func (*Paste) Name

func (c *Paste) Name() string

func (*Paste) Run

func (c *Paste) Run(ctx context.Context, inv *Invocation) error

func (*Paste) RunParsed

func (c *Paste) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Paste) Spec

func (c *Paste) Spec() CommandSpec

type Pathchk

type Pathchk struct{}

func NewPathchk

func NewPathchk() *Pathchk

func (*Pathchk) Name

func (c *Pathchk) Name() string

func (*Pathchk) Run

func (c *Pathchk) Run(_ context.Context, inv *Invocation) error

type Pinky

type Pinky struct{}

func NewPinky

func NewPinky() *Pinky

func (*Pinky) Name

func (c *Pinky) Name() string

func (*Pinky) Run

func (c *Pinky) Run(_ context.Context, inv *Invocation) error

type Pr

type Pr struct{}

func NewPr

func NewPr() *Pr

func (*Pr) Name

func (c *Pr) Name() string

func (*Pr) Run

func (c *Pr) Run(ctx context.Context, inv *Invocation) error

type PrintEnv

type PrintEnv struct{}

func NewPrintEnv

func NewPrintEnv() *PrintEnv

func (*PrintEnv) Name

func (c *PrintEnv) Name() string

func (*PrintEnv) NormalizeParseError added in v0.0.29

func (c *PrintEnv) NormalizeParseError(inv *Invocation, err error) error

func (*PrintEnv) Run

func (c *PrintEnv) Run(ctx context.Context, inv *Invocation) error

func (*PrintEnv) RunParsed

func (c *PrintEnv) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*PrintEnv) Spec

func (c *PrintEnv) Spec() CommandSpec

type Printf

type Printf struct{}

func NewPrintf

func NewPrintf() *Printf

func (*Printf) Name

func (c *Printf) Name() string

func (*Printf) Run

func (c *Printf) Run(ctx context.Context, inv *Invocation) error

type Ptx

type Ptx struct{}

func NewPtx

func NewPtx() *Ptx

func (*Ptx) Name

func (c *Ptx) Name() string

func (*Ptx) Run

func (c *Ptx) Run(_ context.Context, inv *Invocation) error

type Pwd

type Pwd struct{}

func NewPwd

func NewPwd() *Pwd

func (*Pwd) Name

func (c *Pwd) Name() string

func (*Pwd) Run

func (c *Pwd) Run(ctx context.Context, inv *Invocation) error

func (*Pwd) RunParsed

func (c *Pwd) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Pwd) Spec

func (c *Pwd) Spec() CommandSpec

type RG

type RG struct{}

func NewRG

func NewRG() *RG

func (*RG) Name

func (c *RG) Name() string

func (*RG) NormalizeParseError

func (c *RG) NormalizeParseError(inv *Invocation, err error) error

func (*RG) Run

func (c *RG) Run(ctx context.Context, inv *Invocation) error

func (*RG) RunParsed

func (c *RG) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*RG) Spec

func (c *RG) Spec() CommandSpec

type RM

type RM struct{}

func NewRM

func NewRM() *RM

func (*RM) Name

func (c *RM) Name() string

func (*RM) Run

func (c *RM) Run(ctx context.Context, inv *Invocation) error

func (*RM) RunParsed

func (c *RM) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*RM) Spec

func (c *RM) Spec() CommandSpec
type Readlink struct{}
func NewReadlink() *Readlink

func (*Readlink) Name

func (c *Readlink) Name() string

func (*Readlink) Run

func (c *Readlink) Run(ctx context.Context, inv *Invocation) error

func (*Readlink) RunParsed

func (c *Readlink) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Readlink) Spec

func (c *Readlink) Spec() CommandSpec

type Realpath

type Realpath struct{}

func NewRealpath

func NewRealpath() *Realpath

func (*Realpath) Name

func (c *Realpath) Name() string

func (*Realpath) Run

func (c *Realpath) Run(ctx context.Context, inv *Invocation) error

func (*Realpath) RunParsed

func (c *Realpath) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Realpath) Spec

func (c *Realpath) Spec() CommandSpec

type Registry

type Registry = pubcmd.Registry

type Rev

type Rev struct{}

func NewRev

func NewRev() *Rev

func (*Rev) Name

func (c *Rev) Name() string

func (*Rev) Run

func (c *Rev) Run(ctx context.Context, inv *Invocation) error

func (*Rev) RunParsed

func (c *Rev) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Rev) Spec

func (c *Rev) Spec() CommandSpec

type Rmdir

type Rmdir struct{}

func NewRmdir

func NewRmdir() *Rmdir

func (*Rmdir) Name

func (c *Rmdir) Name() string

func (*Rmdir) Run

func (c *Rmdir) Run(ctx context.Context, inv *Invocation) error

func (*Rmdir) RunParsed

func (c *Rmdir) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Rmdir) Spec

func (c *Rmdir) Spec() CommandSpec

type Sed

type Sed struct{}

func NewSed

func NewSed() *Sed

func (*Sed) Name

func (c *Sed) Name() string

func (*Sed) NormalizeInvocation added in v0.0.28

func (c *Sed) NormalizeInvocation(inv *Invocation) *Invocation

func (*Sed) Run

func (c *Sed) Run(ctx context.Context, inv *Invocation) error

func (*Sed) RunParsed

func (c *Sed) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Sed) Spec

func (c *Sed) Spec() CommandSpec

type Seq

type Seq struct{}

func NewSeq

func NewSeq() *Seq

func (*Seq) Name

func (c *Seq) Name() string

func (*Seq) Run

func (c *Seq) Run(ctx context.Context, inv *Invocation) error

func (*Seq) RunParsed

func (c *Seq) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Seq) Spec

func (c *Seq) Spec() CommandSpec

type ShellVariant added in v0.0.33

type ShellVariant = pubcmd.ShellVariant

type Shuf

type Shuf struct{}

func NewShuf

func NewShuf() *Shuf

func (*Shuf) Name

func (c *Shuf) Name() string

func (*Shuf) Run

func (c *Shuf) Run(ctx context.Context, inv *Invocation) error

func (*Shuf) RunParsed added in v0.0.26

func (c *Shuf) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Shuf) Spec added in v0.0.26

func (c *Shuf) Spec() CommandSpec

type Sleep

type Sleep struct{}

func NewSleep

func NewSleep() *Sleep

func (*Sleep) Name

func (c *Sleep) Name() string

func (*Sleep) Run

func (c *Sleep) Run(ctx context.Context, inv *Invocation) error

func (*Sleep) RunParsed

func (c *Sleep) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Sleep) Spec

func (c *Sleep) Spec() CommandSpec

type Sort

type Sort struct{}

func NewSort

func NewSort() *Sort

func (*Sort) Name

func (c *Sort) Name() string

func (*Sort) NormalizeInvocation

func (c *Sort) NormalizeInvocation(inv *Invocation) *Invocation

func (*Sort) Run

func (c *Sort) Run(ctx context.Context, inv *Invocation) error

func (*Sort) RunParsed

func (c *Sort) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Sort) Spec

func (c *Sort) Spec() CommandSpec

type SpecProvider

type SpecProvider = pubcmd.SpecProvider

type Split

type Split struct{}

func NewSplit

func NewSplit() *Split

func (*Split) Name

func (c *Split) Name() string

func (*Split) NormalizeInvocation

func (c *Split) NormalizeInvocation(inv *Invocation) *Invocation

func (*Split) Run

func (c *Split) Run(ctx context.Context, inv *Invocation) error

func (*Split) RunParsed

func (c *Split) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Split) Spec

func (c *Split) Spec() CommandSpec

type Stat

type Stat struct{}

func NewStat

func NewStat() *Stat

func (*Stat) Name

func (c *Stat) Name() string

func (*Stat) Run

func (c *Stat) Run(ctx context.Context, inv *Invocation) error

func (*Stat) RunParsed

func (c *Stat) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Stat) Spec

func (c *Stat) Spec() CommandSpec

type Strings

type Strings struct{}

func NewStrings

func NewStrings() *Strings

func (*Strings) Name

func (c *Strings) Name() string

func (*Strings) NormalizeInvocation

func (c *Strings) NormalizeInvocation(inv *Invocation) *Invocation

func (*Strings) Run

func (c *Strings) Run(ctx context.Context, inv *Invocation) error

func (*Strings) RunParsed

func (c *Strings) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Strings) Spec

func (c *Strings) Spec() CommandSpec

type Sum

type Sum struct{}

func NewSum

func NewSum() *Sum

func (*Sum) Name

func (c *Sum) Name() string

func (*Sum) Run

func (c *Sum) Run(ctx context.Context, inv *Invocation) error

func (*Sum) RunParsed

func (c *Sum) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Sum) Spec

func (c *Sum) Spec() CommandSpec

type TR

type TR struct{}

func NewTR

func NewTR() *TR

func (*TR) Name

func (c *TR) Name() string

func (*TR) Run

func (c *TR) Run(ctx context.Context, inv *Invocation) error

func (*TR) RunParsed

func (c *TR) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*TR) Spec

func (c *TR) Spec() CommandSpec

type Tac

type Tac struct{}

func NewTac

func NewTac() *Tac

func (*Tac) Name

func (c *Tac) Name() string

func (*Tac) Run

func (c *Tac) Run(ctx context.Context, inv *Invocation) error

func (*Tac) RunParsed

func (c *Tac) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Tac) Spec

func (c *Tac) Spec() CommandSpec

type Tail

type Tail struct{}

func NewTail

func NewTail() *Tail

func (*Tail) Name

func (c *Tail) Name() string

func (*Tail) NormalizeInvocation

func (c *Tail) NormalizeInvocation(inv *Invocation) *Invocation

func (*Tail) NormalizeParseError added in v0.0.31

func (c *Tail) NormalizeParseError(inv *Invocation, err error) error

func (*Tail) Run

func (c *Tail) Run(ctx context.Context, inv *Invocation) error

func (*Tail) RunParsed

func (c *Tail) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Tail) Spec

func (c *Tail) Spec() CommandSpec

type Tar

type Tar struct{}

func NewTar

func NewTar() *Tar

func (*Tar) Name

func (c *Tar) Name() string

func (*Tar) Run

func (c *Tar) Run(ctx context.Context, inv *Invocation) error

func (*Tar) RunParsed

func (c *Tar) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Tar) Spec

func (c *Tar) Spec() CommandSpec

type Tee

type Tee struct{}

func NewTee

func NewTee() *Tee

func (*Tee) Name

func (c *Tee) Name() string

func (*Tee) Run

func (c *Tee) Run(ctx context.Context, inv *Invocation) error

func (*Tee) RunParsed

func (c *Tee) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Tee) Spec

func (c *Tee) Spec() CommandSpec

type Test

type Test struct {
	// contains filtered or unexported fields
}

func NewBracketTest

func NewBracketTest() *Test

func NewTest

func NewTest() *Test

func (*Test) Name

func (c *Test) Name() string

func (*Test) Run

func (c *Test) Run(ctx context.Context, inv *Invocation) error

type Timeout

type Timeout struct{}

func NewTimeout

func NewTimeout() *Timeout

func (*Timeout) Name

func (c *Timeout) Name() string

func (*Timeout) NormalizeParseError

func (c *Timeout) NormalizeParseError(inv *Invocation, err error) error

func (*Timeout) Run

func (c *Timeout) Run(ctx context.Context, inv *Invocation) error

func (*Timeout) RunParsed

func (c *Timeout) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Timeout) Spec

func (c *Timeout) Spec() CommandSpec

type Touch

type Touch struct{}

func NewTouch

func NewTouch() *Touch

func (*Touch) Name

func (c *Touch) Name() string

func (*Touch) NormalizeInvocation

func (c *Touch) NormalizeInvocation(inv *Invocation) *Invocation

func (*Touch) Run

func (c *Touch) Run(ctx context.Context, inv *Invocation) error

func (*Touch) RunParsed

func (c *Touch) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Touch) Spec

func (c *Touch) Spec() CommandSpec

type Tree

type Tree struct{}

func NewTree

func NewTree() *Tree

func (*Tree) Name

func (c *Tree) Name() string

func (*Tree) Run

func (c *Tree) Run(ctx context.Context, inv *Invocation) error

func (*Tree) RunParsed

func (c *Tree) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Tree) Spec

func (c *Tree) Spec() CommandSpec

type True

type True struct{}

func NewTrue

func NewTrue() *True

func (*True) Name

func (c *True) Name() string

func (*True) Run

func (c *True) Run(context.Context, *Invocation) error

type Truncate

type Truncate struct{}

func NewTruncate

func NewTruncate() *Truncate

func (*Truncate) Name

func (c *Truncate) Name() string

func (*Truncate) Run

func (c *Truncate) Run(ctx context.Context, inv *Invocation) error

func (*Truncate) RunParsed

func (c *Truncate) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Truncate) Spec

func (c *Truncate) Spec() CommandSpec

type Tsort

type Tsort struct{}

func NewTsort

func NewTsort() *Tsort

func (*Tsort) Name

func (c *Tsort) Name() string

func (*Tsort) Run

func (c *Tsort) Run(ctx context.Context, inv *Invocation) error

func (*Tsort) RunParsed

func (c *Tsort) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Tsort) Spec

func (c *Tsort) Spec() CommandSpec

type Tty

type Tty struct{}

func NewTty

func NewTty() *Tty

func (*Tty) Name

func (c *Tty) Name() string

func (*Tty) NormalizeParseError

func (c *Tty) NormalizeParseError(inv *Invocation, err error) error

func (*Tty) Run

func (c *Tty) Run(ctx context.Context, inv *Invocation) error

func (*Tty) RunParsed

func (c *Tty) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Tty) Spec

func (c *Tty) Spec() CommandSpec

type Umask added in v0.0.18

type Umask struct{}

func NewUmask added in v0.0.18

func NewUmask() *Umask

func (*Umask) Name added in v0.0.18

func (c *Umask) Name() string

func (*Umask) Run added in v0.0.18

func (c *Umask) Run(_ context.Context, inv *Invocation) error

type Uname

type Uname struct{}

func NewUname

func NewUname() *Uname

func (*Uname) Name

func (c *Uname) Name() string

func (*Uname) Run

func (c *Uname) Run(ctx context.Context, inv *Invocation) error

func (*Uname) RunParsed

func (c *Uname) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Uname) Spec

func (c *Uname) Spec() CommandSpec

type Unexpand

type Unexpand struct{}

func NewUnexpand

func NewUnexpand() *Unexpand

func (*Unexpand) Name

func (c *Unexpand) Name() string

func (*Unexpand) NormalizeInvocation added in v0.0.26

func (c *Unexpand) NormalizeInvocation(inv *Invocation) *Invocation

func (*Unexpand) Run

func (c *Unexpand) Run(ctx context.Context, inv *Invocation) error

func (*Unexpand) RunParsed added in v0.0.26

func (c *Unexpand) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Unexpand) Spec added in v0.0.26

func (c *Unexpand) Spec() CommandSpec

type Uniq

type Uniq struct{}

func NewUniq

func NewUniq() *Uniq

func (*Uniq) Name

func (c *Uniq) Name() string

func (*Uniq) NormalizeInvocation

func (c *Uniq) NormalizeInvocation(inv *Invocation) *Invocation

func (*Uniq) Run

func (c *Uniq) Run(ctx context.Context, inv *Invocation) error

func (*Uniq) RunParsed

func (c *Uniq) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Uniq) Spec

func (c *Uniq) Spec() CommandSpec
type Unlink struct{}
func NewUnlink() *Unlink

func (*Unlink) Name

func (c *Unlink) Name() string

func (*Unlink) Run

func (c *Unlink) Run(ctx context.Context, inv *Invocation) error

type Uptime

type Uptime struct{}

func NewUptime

func NewUptime() *Uptime

func (*Uptime) Name

func (c *Uptime) Name() string

func (*Uptime) Run

func (c *Uptime) Run(ctx context.Context, inv *Invocation) error

func (*Uptime) RunParsed

func (c *Uptime) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Uptime) Spec

func (c *Uptime) Spec() CommandSpec

type Users

type Users struct{}

func NewUsers

func NewUsers() *Users

func (*Users) Name

func (c *Users) Name() string

func (*Users) Run

func (c *Users) Run(ctx context.Context, inv *Invocation) error

func (*Users) RunParsed added in v0.0.26

func (c *Users) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Users) Spec added in v0.0.26

func (c *Users) Spec() CommandSpec

type Vdir

type Vdir struct{}

func NewVdir

func NewVdir() *Vdir

func (*Vdir) Name

func (c *Vdir) Name() string

func (*Vdir) Run

func (c *Vdir) Run(ctx context.Context, inv *Invocation) error

type VersionInfo

type VersionInfo = pubcmd.VersionInfo

type WC

type WC struct{}

func NewWC

func NewWC() *WC

func (*WC) Name

func (c *WC) Name() string

func (*WC) NormalizeInvocation added in v0.0.26

func (c *WC) NormalizeInvocation(inv *Invocation) *Invocation

func (*WC) Run

func (c *WC) Run(ctx context.Context, inv *Invocation) error

func (*WC) RunParsed

func (c *WC) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*WC) Spec

func (c *WC) Spec() CommandSpec

type Which

type Which struct{}

func NewWhich

func NewWhich() *Which

func (*Which) Name

func (c *Which) Name() string

func (*Which) Run

func (c *Which) Run(ctx context.Context, inv *Invocation) error

func (*Which) RunParsed

func (c *Which) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Which) Spec

func (c *Which) Spec() CommandSpec

type Who

type Who struct{}

func NewWho

func NewWho() *Who

func (*Who) Name

func (c *Who) Name() string

func (*Who) Run

func (c *Who) Run(ctx context.Context, inv *Invocation) error

func (*Who) RunParsed

func (c *Who) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Who) Spec

func (c *Who) Spec() CommandSpec

type Whoami

type Whoami struct{}

func NewWhoami

func NewWhoami() *Whoami

func (*Whoami) Name

func (c *Whoami) Name() string

func (*Whoami) NormalizeParseError

func (c *Whoami) NormalizeParseError(inv *Invocation, err error) error

func (*Whoami) Run

func (c *Whoami) Run(ctx context.Context, inv *Invocation) error

func (*Whoami) RunParsed

func (c *Whoami) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Whoami) Spec

func (c *Whoami) Spec() CommandSpec

type XArgs

type XArgs struct{}

func NewXArgs

func NewXArgs() *XArgs

func (*XArgs) Name

func (c *XArgs) Name() string

func (*XArgs) Run

func (c *XArgs) Run(ctx context.Context, inv *Invocation) error

func (*XArgs) RunParsed

func (c *XArgs) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*XArgs) Spec

func (c *XArgs) Spec() CommandSpec

type Xan

type Xan struct{}

func NewXan

func NewXan() *Xan

func (*Xan) Name

func (c *Xan) Name() string

func (*Xan) Run

func (c *Xan) Run(ctx context.Context, inv *Invocation) error

type Yes

type Yes struct{}

func NewYes

func NewYes() *Yes

func (*Yes) Name

func (c *Yes) Name() string

func (*Yes) Run

func (c *Yes) Run(ctx context.Context, inv *Invocation) error

func (*Yes) RunParsed

func (c *Yes) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error

func (*Yes) Spec

func (c *Yes) Spec() CommandSpec

Source Files

Jump to

Keyboard shortcuts

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