completion

package
v0.23.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package completion provides the defined completion CLI commands for Vela.

Usage:

import "github.com/go-vela/cli/command/completion"

Index

Constants

This section is empty.

Variables

View Source
var CommandGenerate = &cli.Command{
	Name:        "completion",
	Description: "Use this command to generate a shell auto completion script.",
	Usage:       "Generate a shell auto completion script",
	Action:      generate,
	Flags: []cli.Flag{

		&cli.StringFlag{
			EnvVars: []string{"VELA_BASH", "COMPLETION_BASH"},
			Name:    "bash",
			Aliases: []string{"b"},
			Usage:   "generate a bash auto completion script",
			Value:   "false",
		},
		&cli.StringFlag{
			EnvVars: []string{"VELA_ZSH", "COMPLETION_ZSH"},
			Name:    "zsh",
			Aliases: []string{"z"},
			Usage:   "generate a zsh auto completion script",
			Value:   "false",
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
  1. Enable auto completion for the current bash session.
    $ source <({{.HelpName}} --bash true)
  2. Enable auto completion for the current zsh session.
    $ source <({{.HelpName}} --zsh true)
  3. Enable auto completion for bash permanently.
    visit https://go-vela.github.io/docs/reference/cli/completion/generate/#bash
  4. Enable auto completion for zsh permanently.
    visit https://go-vela.github.io/docs/reference/cli/completion/generate/#zsh

DOCUMENTATION:

  https://go-vela.github.io/docs/reference/cli/completion/generate/
`, cli.CommandHelpTemplate),
}

CommandGenerate defines the command for producing an auto completion script.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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