spec

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package spec provides spec file generation for use with carapace-bin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Spec

func Spec(cmd *cobra.Command) string

Spec generates the spec file.

Types

type Command

type Command struct {
	Name            string            `yaml:"name"`
	Aliases         []string          `yaml:"aliases,omitempty"`
	Description     string            `yaml:"description,omitempty"`
	Group           string            `yaml:"group,omitempty"`
	Hidden          bool              `yaml:"hidden,omitempty"`
	ExclusiveFlags  [][]string        `yaml:"exclusiveflags,omitempty"`
	Flags           map[string]string `yaml:"flags,omitempty"`
	PersistentFlags map[string]string `yaml:"persistentflags,omitempty"`
	Completion      struct {
		Flag          map[string][]string `yaml:"flag,omitempty"`
		Positional    [][]string          `yaml:"positional,omitempty"`
		PositionalAny []string            `yaml:"positionalany,omitempty"`
		Dash          [][]string          `yaml:"dash,omitempty"`
		DashAny       []string            `yaml:"dashany,omitempty"`
	} `yaml:"completion,omitempty"`
	Commands []Command `yaml:"commands,omitempty"`
}

Jump to

Keyboard shortcuts

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