notes
This commit is contained in:
parent
b7ab5b0c48
commit
10c9734c5e
2
app.go
2
app.go
@ -482,7 +482,7 @@ func (a *Author) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DefaultAppComplete returns an ActionFunc to run a default command if non were passed.
|
// DefaultAppComplete returns an ActionFunc to run a default command if non were passed.
|
||||||
// Usage: `app.Action = DefaultCommand("command")`
|
// Usage: `app.Action = cli.DefaultCommand("command")`
|
||||||
func DefaultCommand(name string) ActionFunc {
|
func DefaultCommand(name string) ActionFunc {
|
||||||
return func(ctx *Context) error {
|
return func(ctx *Context) error {
|
||||||
return ctx.App.Command(name).Run(ctx)
|
return ctx.App.Command(name).Run(ctx)
|
||||||
|
2
flag.go
2
flag.go
@ -778,7 +778,7 @@ func visibleFlags(fl []Flag) []Flag {
|
|||||||
func prefixFor(name string) (prefix string) {
|
func prefixFor(name string) (prefix string) {
|
||||||
if len(name) == 1 {
|
if len(name) == 1 {
|
||||||
prefix = "-"
|
prefix = "-"
|
||||||
} else if name[0] != '-' {
|
} else {
|
||||||
prefix = "--"
|
prefix = "--"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user