Merge pull request #1396 from urfave/suggestion-pluggability

Introduce override hooks for suggestions
This commit is contained in:
2022-05-22 11:14:46 -04:00
committed by GitHub
6 changed files with 62 additions and 36 deletions

View File

@@ -26,6 +26,11 @@ application:
VARIABLES
var (
SuggestFlag SuggestFlagFunc = suggestFlag
SuggestCommand SuggestCommandFunc = suggestCommand
SuggestDidYouMeanTemplate string = suggestDidYouMeanTemplate
)
var AppHelpTemplate = `NAME:
{{.Name}}{{if .Usage}} - {{.Usage}}{{end}}
@@ -1622,6 +1627,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.
}