Documentation
¶
Index ¶
- Constants
- Variables
- type Args
- func (a *Args) After(command ...string)
- func (a *Args) AppendParams(params ...string)
- func (a *Args) Before(command ...string)
- func (a *Args) Commands() []*cmd.Cmd
- func (a *Args) FirstParam() string
- func (a *Args) GetParam(i int) string
- func (a *Args) HasSubcommand() bool
- func (a *Args) IndexOfParam(param string) int
- func (a *Args) InsertParam(i int, items ...string)
- func (a *Args) IsParamsEmpty() bool
- func (a *Args) LastParam() string
- func (a *Args) ParamsSize() int
- func (a *Args) PrependParams(params ...string)
- func (a *Args) RemoveParam(i int) string
- func (a *Args) Replace(executable, command string, params ...string)
- func (a *Args) ReplaceParam(i int, item string)
- func (a *Args) ToCmd() *cmd.Cmd
- func (a *Args) Words() []string
- type Command
- type ExecError
- type Runner
- type Updater
Constants ¶
View Source
const Version = "2.1.0"
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Args ¶
type Args struct { Executable string Command string Params []string Noop bool // contains filtered or unexported fields }
func (*Args) AppendParams ¶
func (*Args) FirstParam ¶
func (*Args) HasSubcommand ¶
func (*Args) IndexOfParam ¶
func (*Args) InsertParam ¶ added in v0.15.0
func (*Args) IsParamsEmpty ¶
func (*Args) ParamsSize ¶
func (*Args) PrependParams ¶ added in v0.19.2
func (*Args) RemoveParam ¶
func (*Args) ReplaceParam ¶
type Command ¶
type Command struct { Run func(cmd *Command, args *Args) Flag flag.FlagSet Key string Usage string Short string Long string GitExtension bool // contains filtered or unexported fields }
func (*Command) FormattedUsage ¶ added in v0.26.0
func (*Command) PrintUsage ¶
func (c *Command) PrintUsage()
type Updater ¶ added in v1.0.0
func NewUpdater ¶ added in v1.0.0
func NewUpdater() *Updater
func (*Updater) PromptForUpdate ¶ added in v1.0.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.