config

package
v1.0.0-rc.65 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Path = filepath.Join(utils.ConfigHome(), "config.json")

Functions

func CommandParam

func CommandParam(command types.CommandSpec, name string) (types.Param, bool)

func ExtractParams

func ExtractParams(args []string, command types.CommandSpec) (map[string]any, error)

Types

type Config

type Config struct {
	Root    []RootItem        `json:"root,omitempty"`
	EnvMap  map[string]string `json:"env,omitempty"`
	EnvFile string            `json:"envFile,omitempty"`
	Env     map[string]string `json:"-"`
}

func Load

func Load() (Config, error)

func (Config) RootItem

func (c Config) RootItem(item RootItem, extensions extensions.ExtensionMap) (types.ListItem, error)

type RootItem

type RootItem struct {
	Title   string `json:"title"`
	Command string `json:"command"`
}

Jump to

Keyboard shortcuts

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