validation

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidAliasExpansionFunc

func ValidAliasExpansionFunc(cmd *cobra.Command) func(string) bool

ValidAliasExpansionFunc returns a function that will check if the given string is a valid alias expansion. An expansion is valid if:

  • it is a shell expansion,
  • it is a non-shell expansion that corresponds to an existing command, extension, or alias.

func ValidAliasNameFunc

func ValidAliasNameFunc(cmd *cobra.Command) func(string) bool

ValidAliasNameFunc returns a function that will check if the given string is a valid alias name. A name is valid if:

  • it does not shadow an existing command,
  • it is not nested under a command that is runnable,
  • it is not nested under a command that does not exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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