Introduce override hooks for suggestions
Related to https://github.com/urfave/cli/pull/1390#discussion_r871398659
This commit is contained in:
8
testdata/godoc-v2.x.txt
vendored
8
testdata/godoc-v2.x.txt
vendored
@@ -26,6 +26,10 @@ application:
|
||||
|
||||
VARIABLES
|
||||
|
||||
var (
|
||||
SuggestFlag SuggestFlagFunc = suggestFlag
|
||||
SuggestCommand SuggestCommandFunc = suggestCommand
|
||||
)
|
||||
var AppHelpTemplate = `NAME:
|
||||
{{.Name}}{{if .Usage}} - {{.Usage}}{{end}}
|
||||
|
||||
@@ -1539,6 +1543,10 @@ func (f *StringSliceFlag) String() string
|
||||
func (f *StringSliceFlag) TakesValue() bool
|
||||
TakesValue returns true of the flag takes a value, otherwise false
|
||||
|
||||
type SuggestCommandFunc func(commands []*Command, provided string) string
|
||||
|
||||
type SuggestFlagFunc func(flags []Flag, provided string, hideHelp bool) string
|
||||
|
||||
type Timestamp struct {
|
||||
// Has unexported fields.
|
||||
}
|
||||
|
Reference in New Issue
Block a user