aliasutil

package
v0.0.0-...-a92c5f4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAliasArgs

func CreateAliasArgs(providedArgs []string, aliasTargetStr string) ([]string, error)

providedArgs: Arguments provided to the command, minus the command name itself aliasTargetStr: The command string provided, specifying what to alias to.

May include special characters to specify arguments provided to
the alias. By default, extra args are placed at the end of the alias.

Alias target special strings are: $1,$2... - Insert a positional argument here. $R - Insert remaining unused arguments here.

Types

type ParsedArgs

type ParsedArgs struct {
	UnknownArgs []string
	// Element 0 will ALWAYS be "--"
	PosArgs []string
}

func ClassifyArgs

func ClassifyArgs(args []string) ParsedArgs

Returns unknown args, positional args

Jump to

Keyboard shortcuts

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