completion

package
v0.23.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 1 Imported by: 103

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutocompleteDefault

func AutocompleteDefault(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteDefault - Use the default shell completion, allows path completion.

func AutocompleteNone

func AutocompleteNone(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

AutocompleteNone - Block the default shell completion (no paths)

func CompleteCommandFlags

func CompleteCommandFlags(cmd *cobra.Command, flags FlagCompletions)

CompleteCommandFlags - Add completion functions for each flagname in FlagCompletions.

Types

type FlagCompletions

type FlagCompletions map[string]func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

FlagCompletions - hold flag completion functions to be applied later with CompleteCommandFlags()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL