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
- Variables
- func DefaultRegistry() *commands.Registry
- func EnsureNetworkCommands(registry commands.CommandRegistry) error
- func NewB2Sum() *checksumSum
- func NewMD5Sum() *checksumSum
- func NewSHA1Sum() *checksumSum
- func NewSHA224Sum() *checksumSum
- func NewSHA256Sum() *checksumSum
- func NewSHA384Sum() *checksumSum
- func NewSHA512Sum() *checksumSum
- func RenderBashInvocationUsage(w io.Writer, cfg BashInvocationConfig) error
- func ValidateShellScriptFileData(path string, data []byte) error
- type Arch
- type ArgSpec
- type Base32
- type Base64
- type Basename
- type Basenc
- type Bash
- type BashInvocation
- type BashInvocationConfig
- type BashSourceMode
- type CDResolve
- type CP
- type Cat
- type Chgrp
- type Chmod
- type Chown
- type Cksum
- type Clear
- type Column
- func (c *Column) Name() string
- func (c *Column) NormalizeInvocation(inv *Invocation) *Invocation
- func (c *Column) NormalizeParseError(inv *Invocation, err error) error
- func (c *Column) Run(ctx context.Context, inv *Invocation) error
- func (c *Column) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
- func (c *Column) Spec() CommandSpec
- type Comm
- type Command
- type CommandFS
- type CommandFunc
- type CommandRegistry
- type CommandSpec
- type Compadjust
- type Compgen
- type Complete
- type Compopt
- type Csplit
- type Curl
- type Cut
- type DU
- type Date
- type Dd
- type Diff
- type Dir
- type Dircolors
- type Dirname
- type Echo
- type Env
- type ExecutionRequest
- type ExecutionResult
- type ExitError
- type Expand
- type Expr
- type Factor
- type False
- type FileCmd
- type Find
- type Fmt
- type Fold
- type Grep
- type Groups
- type Gzip
- type Head
- type Help
- type History
- func (c *History) Name() string
- func (c *History) NormalizeParseError(inv *Invocation, err error) error
- func (c *History) Run(ctx context.Context, inv *Invocation) error
- func (c *History) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
- func (c *History) Spec() CommandSpec
- type Hostid
- type Hostname
- type ID
- type Install
- type InteractiveRequest
- type InteractiveResult
- type Invocation
- type InvocationOptions
- type Join
- type Kill
- type LN
- type LS
- type LazyCommandLoader
- type LegacySpecProvider
- type Link
- type Logname
- type MV
- type Mkdir
- type Mkfifo
- type Mktemp
- type NL
- type Nproc
- type Numfmt
- type OD
- type OptionArity
- type OptionSpec
- type ParseConfig
- type ParseErrorNormalizer
- type ParseInvocationNormalizer
- type ParsedCommand
- type ParsedOptionOccurrence
- type ParsedRunner
- type Paste
- type Pathchk
- type Pinky
- type Pr
- type PrintEnv
- func (c *PrintEnv) Name() string
- func (c *PrintEnv) NormalizeParseError(inv *Invocation, err error) error
- func (c *PrintEnv) Run(ctx context.Context, inv *Invocation) error
- func (c *PrintEnv) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error
- func (c *PrintEnv) Spec() CommandSpec
- type Printf
- type Ptx
- type Pwd
- type RG
- type RM
- type Readlink
- type Realpath
- type Registry
- type Rev
- type Rmdir
- type Sed
- type Seq
- type ShellVariant
- type Shuf
- type Sleep
- type Sort
- type SpecProvider
- type Split
- type Stat
- type Strings
- type Sum
- type TR
- type Tac
- type Tail
- func (c *Tail) Name() string
- func (c *Tail) NormalizeInvocation(inv *Invocation) *Invocation
- func (c *Tail) NormalizeParseError(inv *Invocation, err error) error
- func (c *Tail) Run(ctx context.Context, inv *Invocation) error
- func (c *Tail) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
- func (c *Tail) Spec() CommandSpec
- type Tar
- type Tee
- type Test
- type Timeout
- func (c *Timeout) Name() string
- func (c *Timeout) NormalizeParseError(inv *Invocation, err error) error
- func (c *Timeout) Run(ctx context.Context, inv *Invocation) error
- func (c *Timeout) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
- func (c *Timeout) Spec() CommandSpec
- type Touch
- type Tree
- type True
- type Truncate
- type Tsort
- type Tty
- type Umask
- type Uname
- type Unexpand
- func (c *Unexpand) Name() string
- func (c *Unexpand) NormalizeInvocation(inv *Invocation) *Invocation
- func (c *Unexpand) Run(ctx context.Context, inv *Invocation) error
- func (c *Unexpand) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
- func (c *Unexpand) Spec() CommandSpec
- type Uniq
- type Unlink
- type Uptime
- type Users
- type Vdir
- type VersionInfo
- type WC
- type Which
- type Who
- type Whoami
- type XArgs
- type Xan
- type Yes
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 EnsureNetworkCommands ¶
func EnsureNetworkCommands(registry commands.CommandRegistry) error
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
Types ¶
type Arch ¶
type Arch struct{}
func (*Arch) RunParsed ¶
func (c *Arch) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Arch) Spec ¶
func (c *Arch) Spec() CommandSpec
type Base32 ¶
type Base32 struct{}
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 (*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) 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 (*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 (*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 BashSourceMode ¶
type BashSourceMode int
const ( BashSourceStdin BashSourceMode = iota BashSourceCommandString BashSourceFile )
type CP ¶
type CP struct{}
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 (*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 (*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 (*Chmod) NormalizeInvocation ¶
func (c *Chmod) NormalizeInvocation(inv *Invocation) *Invocation
func (*Chmod) Spec ¶
func (c *Chmod) Spec() CommandSpec
type Chown ¶
type Chown struct{}
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 (*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 (*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 (*Column) NormalizeInvocation ¶
func (c *Column) NormalizeInvocation(inv *Invocation) *Invocation
func (*Column) NormalizeParseError ¶
func (c *Column) NormalizeParseError(inv *Invocation, err error) 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 (*Comm) RunParsed ¶
func (c *Comm) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Comm) Spec ¶
func (c *Comm) Spec() CommandSpec
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
type Csplit ¶
type Csplit struct{}
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 (*Curl) NormalizeInvocation ¶
func (c *Curl) NormalizeInvocation(inv *Invocation) *Invocation
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 (*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 (*DU) RunParsed ¶
func (c *DU) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*DU) Spec ¶
func (c *DU) Spec() CommandSpec
type Dd ¶
type Dd struct{}
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 Dir ¶
type Dir struct{}
func (*Dir) NormalizeParseError ¶ added in v0.0.32
func (c *Dir) NormalizeParseError(inv *Invocation, err error) 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) 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) 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 (*Echo) NormalizeInvocation ¶
func (c *Echo) NormalizeInvocation(inv *Invocation) *Invocation
func (*Echo) RunParsed ¶
func (c *Echo) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Echo) Spec ¶
func (c *Echo) Spec() CommandSpec
type ExecutionRequest ¶
type ExecutionRequest = pubcmd.ExecutionRequest
type ExecutionResult ¶
type ExecutionResult = pubcmd.ExecutionResult
type Expand ¶
type Expand struct{}
func (*Expand) NormalizeInvocation ¶ added in v0.0.26
func (c *Expand) NormalizeInvocation(inv *Invocation) *Invocation
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 Factor ¶
type Factor struct{}
func (*Factor) RunParsed ¶
func (c *Factor) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Factor) Spec ¶
func (c *Factor) Spec() CommandSpec
type FileCmd ¶
type FileCmd struct{}
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 (*Find) NormalizeInvocation ¶
func (c *Find) NormalizeInvocation(inv *Invocation) *Invocation
func (*Find) RunParsed ¶
func (c *Find) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Find) Spec ¶
func (c *Find) Spec() CommandSpec
type Fold ¶
type Fold struct{}
func (*Fold) NormalizeInvocation ¶ added in v0.0.27
func (c *Fold) NormalizeInvocation(inv *Invocation) *Invocation
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 (*Grep) NormalizeParseError ¶ added in v0.0.27
func (c *Grep) NormalizeParseError(inv *Invocation, err error) 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 (*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 (*Gzip) RunParsed ¶
func (c *Gzip) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Gzip) Spec ¶
func (c *Gzip) Spec() CommandSpec
type Head ¶
type Head struct{}
func (*Head) NormalizeInvocation ¶
func (c *Head) NormalizeInvocation(inv *Invocation) *Invocation
func (*Head) RunParsed ¶
func (c *Head) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Head) Spec ¶
func (c *Head) Spec() CommandSpec
type History ¶
type History struct{}
func NewHistory ¶
func NewHistory() *History
func (*History) NormalizeParseError ¶ added in v0.0.24
func (c *History) NormalizeParseError(inv *Invocation, err error) 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 (*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 ID ¶
type ID struct{}
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) 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 (*Join) RunParsed ¶
func (c *Join) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Join) Spec ¶
func (c *Join) Spec() CommandSpec
type LN ¶
type LN struct{}
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 (*LS) NormalizeParseError ¶ added in v0.0.32
func (c *LS) NormalizeParseError(inv *Invocation, err error) 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 ¶
type Link struct{}
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) 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 (*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 (*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 (*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 (*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 (*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 (*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 (*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 (*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 (*Paste) RunParsed ¶
func (c *Paste) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Paste) Spec ¶
func (c *Paste) Spec() CommandSpec
type PrintEnv ¶
type PrintEnv struct{}
func NewPrintEnv ¶
func NewPrintEnv() *PrintEnv
func (*PrintEnv) NormalizeParseError ¶ added in v0.0.29
func (c *PrintEnv) NormalizeParseError(inv *Invocation, err error) error
func (*PrintEnv) RunParsed ¶
func (c *PrintEnv) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error
func (*PrintEnv) Spec ¶
func (c *PrintEnv) Spec() CommandSpec
type Pwd ¶
type Pwd struct{}
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 (*RG) NormalizeParseError ¶
func (c *RG) NormalizeParseError(inv *Invocation, err error) 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 (*RM) RunParsed ¶
func (c *RM) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*RM) Spec ¶
func (c *RM) Spec() CommandSpec
type Readlink ¶
type Readlink struct{}
func NewReadlink ¶
func NewReadlink() *Readlink
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) RunParsed ¶
func (c *Realpath) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Realpath) Spec ¶
func (c *Realpath) Spec() CommandSpec
type Rev ¶
type Rev struct{}
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 (*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 (*Sed) NormalizeInvocation ¶ added in v0.0.28
func (c *Sed) NormalizeInvocation(inv *Invocation) *Invocation
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 (*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 (*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 (*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 (*Sort) NormalizeInvocation ¶
func (c *Sort) NormalizeInvocation(inv *Invocation) *Invocation
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 (*Split) NormalizeInvocation ¶
func (c *Split) NormalizeInvocation(inv *Invocation) *Invocation
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 (*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) NormalizeInvocation ¶
func (c *Strings) NormalizeInvocation(inv *Invocation) *Invocation
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 (*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 (*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 (*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 (*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) 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 (*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 (*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
type Timeout ¶
type Timeout struct{}
func NewTimeout ¶
func NewTimeout() *Timeout
func (*Timeout) NormalizeParseError ¶
func (c *Timeout) NormalizeParseError(inv *Invocation, err error) 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 (*Touch) NormalizeInvocation ¶
func (c *Touch) NormalizeInvocation(inv *Invocation) *Invocation
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 (*Tree) RunParsed ¶
func (c *Tree) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Tree) Spec ¶
func (c *Tree) Spec() CommandSpec
type Truncate ¶
type Truncate struct{}
func NewTruncate ¶
func NewTruncate() *Truncate
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 (*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 (*Tty) NormalizeParseError ¶
func (c *Tty) NormalizeParseError(inv *Invocation, err error) error
func (*Tty) RunParsed ¶
func (c *Tty) RunParsed(_ context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Tty) Spec ¶
func (c *Tty) Spec() CommandSpec
type Uname ¶
type Uname struct{}
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) NormalizeInvocation ¶ added in v0.0.26
func (c *Unexpand) NormalizeInvocation(inv *Invocation) *Invocation
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 (*Uniq) NormalizeInvocation ¶
func (c *Uniq) NormalizeInvocation(inv *Invocation) *Invocation
func (*Uniq) RunParsed ¶
func (c *Uniq) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*Uniq) Spec ¶
func (c *Uniq) Spec() CommandSpec
type Uptime ¶
type Uptime struct{}
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 (*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 VersionInfo ¶
type VersionInfo = pubcmd.VersionInfo
type WC ¶
type WC struct{}
func (*WC) NormalizeInvocation ¶ added in v0.0.26
func (c *WC) NormalizeInvocation(inv *Invocation) *Invocation
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 (*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 (*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 (*Whoami) NormalizeParseError ¶
func (c *Whoami) NormalizeParseError(inv *Invocation, err error) 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 (*XArgs) RunParsed ¶
func (c *XArgs) RunParsed(ctx context.Context, inv *Invocation, matches *ParsedCommand) error
func (*XArgs) Spec ¶
func (c *XArgs) Spec() CommandSpec
type Yes ¶
type Yes struct{}
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
¶
- aliases.go
- arch.go
- arch_machine.go
- backup_helpers.go
- base32.go
- base64.go
- basename.go
- basenc.go
- basenc_formats.go
- basenc_helpers.go
- bash.go
- bash_invocation.go
- bash_jobcontrol_linux.go
- bash_script_file.go
- basic_regexp.go
- block_size_helpers.go
- cat.go
- cat_appendmode_unix.go
- cd_resolve.go
- checksum_sums.go
- chgrp.go
- chmod.go
- chown.go
- cksum.go
- clear.go
- color_data.go
- column.go
- comm.go
- command_helpers.go
- compadjust.go
- compgen.go
- complete.go
- completion_backend.go
- completion_helpers.go
- compopt.go
- cp.go
- csplit.go
- curl.go
- cut.go
- date.go
- date_format.go
- date_parse.go
- dd.go
- dd_tables.go
- diff.go
- dir.go
- dircolors.go
- dirname.go
- doc.go
- du.go
- duration_helpers.go
- echo.go
- env.go
- env_split.go
- expand.go
- expr.go
- expr_ast.go
- expr_regex.go
- factor.go
- file.go
- file_helpers.go
- fileinfo_helpers.go
- find.go
- find_expr.go
- find_matcher.go
- find_parser.go
- fmt.go
- fold.go
- grep.go
- grep_alias.go
- groups.go
- gzip.go
- head.go
- head_support.go
- head_tail.go
- help.go
- help_platform.go
- history.go
- hostid.go
- hostname.go
- id.go
- input_tty.go
- install.go
- io_helpers.go
- join.go
- kill.go
- link.go
- ln.go
- logname.go
- ls.go
- mkdir.go
- mkfifo.go
- mktemp.go
- mv.go
- nl.go
- not_implemented_helpers.go
- nproc.go
- numfmt.go
- od.go
- paste.go
- path_helpers.go
- pathchk.go
- permission_helpers.go
- pinky.go
- pr.go
- printf.go
- ptx.go
- pwd.go
- readlink.go
- realpath.go
- registry.go
- rev.go
- rg.go
- rg_ignore.go
- rm.go
- rmdir.go
- sed.go
- seq.go
- shuf.go
- shuf_random_source.go
- shuf_range.go
- sleep.go
- sort.go
- source_helpers.go
- split.go
- stat.go
- strings.go
- subexec_helpers.go
- sum.go
- tac.go
- tail.go
- tail_pid.go
- tar.go
- tee.go
- test.go
- text_helpers.go
- timeout.go
- touch.go
- tr.go
- trace_helpers.go
- tree.go
- truefalse.go
- truncate.go
- tsort.go
- tty.go
- umask.go
- uname.go
- unexpand.go
- uniq.go
- unlink.go
- uptime.go
- users.go
- value_locale_helpers.go
- vdir.go
- wc.go
- which.go
- who.go
- whoami.go
- write_error.go
- xan.go
- xan_commands.go
- xan_expr.go
- xargs.go
- yes.go
Click to show internal directories.
Click to hide internal directories.