tailscale.comtailscale.com/cmd/tailscale/cli/ffcomplete/internal Index | Files

package internal

import "tailscale.com/cmd/tailscale/cli/ffcomplete/internal"

Package internal contains internal code for the ffcomplete package.

Index

Variables

var (
	CompleteCmds  map[*ffcli.Command]CompleteFunc
	CompleteFlags map[*flag.Flag]CompleteFunc
)

Functions

func Complete

func Complete(root *ffcli.Command, args []string, startFlags, descs bool) (words []string, dir cobra.ShellCompDirective, err error)

Complete returns the autocomplete suggestions for the root program and args.

The returned words do not necessarily need to be prefixed with the last arg which is being completed. For example, '--bool-flag=' will have completions 'true' and 'false'.

"HIDDEN: " is trimmed from the start of Flag Usage's.

Types

type CompleteFunc

type CompleteFunc func([]string) ([]string, cobra.ShellCompDirective, error)

Source Files

complete.go

Version
v1.84.2 (latest)
Published
Jun 9, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
27 minutes ago

Tools for package owners.