criocli

package
v1.16.6 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Completion = cli.Command{
	Name:        "complete",
	Aliases:     []string{"completion"},
	Usage:       "Output shell completion code",
	ArgsUsage:   "SHELL",
	Description: "Output shell completion code for bash, zsh or fish.",
	Action: func(c *cli.Context) error {

		if c.NArg() == 0 {
			return bashCompletion(c)
		}

		if c.NArg() != 1 {
			return cli.ShowSubcommandHelp(c)
		}

		switch c.Args().First() {
		case "bash":
			return bashCompletion(c)
		case "fish":
			return fishCompletion(c)
		case "zsh":
			return zshCompletion(c)
		default:
			return fmt.Errorf("only bash, fish or zsh are supported")
		}
	},
}
View Source
var DefaultsPath string

DefaultsPath is the path to default configuration files set at build time

Functions

func GetConfigFromContext

func GetConfigFromContext(c *cli.Context) (string, *libconfig.Config, error)

func GetFlagsAndMetadata

func GetFlagsAndMetadata(systemContext *types.SystemContext) ([]cli.Flag, map[string]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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