aliases

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package aliases expands built-in command shortcuts without executing a shell.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(name string, aliases map[string]string, builtins map[string]bool) error

Check validates an alias and every alias it expands through until a built-in.

func Expand

func Expand(args []string, aliases map[string]string, builtins map[string]bool) ([]string, error)

Expand substitutes arguments without re-parsing or executing user input. Only the invoked alias is checked, so one broken entry cannot block other commands.

func ExpandCompletion

func ExpandCompletion(args []string, definitions map[string]string, builtins map[string]bool) ([]string, error)

ExpandCompletion keeps the in-progress word last, as Cobra's completion protocol requires. Fixed flags after a substituted argument must not become the completion prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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