MCPcopy
hub / github.com/spf13/cobra / MarkPersistentFlagFilename

Method MarkPersistentFlagFilename

shell_completions.go:61–63  ·  view source on GitHub ↗

MarkPersistentFlagFilename instructs the various shell completion implementations to limit completions for the named persistent flag to the specified file extensions.

(name string, extensions ...string)

Source from the content-addressed store, hash-verified

59// implementations to limit completions for the named persistent flag to the
60// specified file extensions.
61func (c *Command) MarkPersistentFlagFilename(name string, extensions ...string) error {
62 return MarkFlagFilename(c.PersistentFlags(), name, extensions...)
63}
64
65// MarkFlagFilename instructs the various shell completion implementations to
66// limit completions for the named flag to the specified file extensions.

Callers 1

TestBashCompletionsFunction · 0.95

Calls 2

PersistentFlagsMethod · 0.95
MarkFlagFilenameFunction · 0.85

Tested by 1

TestBashCompletionsFunction · 0.76