alias

package
v1.7.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandPrefix

func ExpandPrefix(rawCmd string, aliases config.Aliases) string

ExpandPrefix expands alias prefix with the target command based on provided configuration. The function requires already sanitized input raw command - no whitespace characters at the beginning or end are allowed.

func ListExactForExecutor

func ListExactForExecutor(rawName string, aliases config.Aliases) []string

ListExactForExecutor lists aliases for configured commands that are equal to the executor name. For example, for the `botkube/kubectl` executor it lists aliases which are defined for the `kubectl` command only, without any additional verbs and flags.

The aliases slice is already sorted alphabetically.

func ListForBuiltinVerbPrefix

func ListForBuiltinVerbPrefix(verb command.Verb, aliases config.Aliases) []string

ListForBuiltinVerbPrefix lists aliases for builtin commands that starts with the verb prefix names.

func ListForExecutorPrefix

func ListForExecutorPrefix(rawName string, aliases config.Aliases) []string

ListForExecutorPrefix lists aliases for configured commands that starts with the executor prefix names. For example, for the `botkube/kubectl` executor it lists aliases which are defined for the `kubectl` command, and also the `kubectl` commands that contain additional verbs and flags, like `kubectl get pods`.

The aliases slice is already sorted alphabetically.

Types

This section is empty.

Jump to

Keyboard shortcuts

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