Documentation
¶
Overview ¶
Package dao for evaluating boolean tag expressions against project tags.
Index ¶
- Variables
- func CheckUserColor(colorFlag bool) bool
- func EvaluateEnv(envList []string) ([]string, error)
- func FormatErrors(re Resource, errs []error) error
- func IsGitWorktree(path string) (bool, error)
- func LoadBlockTheme(block *Block)
- func LoadStreamTheme(stream *Stream)
- func LoadTUITheme(tui *TUI)
- func LoadTableTheme(mTable *Table)
- func LoadTreeTheme(tree *Tree)
- func MergeEnvs(envs ...[]string) []string
- func ParseCmd(cmd string, runFlags *core.RunFlags, setFlags *core.SetRunFlags, ...) ([]Task, []Project, error)
- func ParseManyTasks(taskNames []string, runFlags *core.RunFlags, setFlags *core.SetRunFlags, ...) ([]Task, []Project, error)
- func ParseNodeEnv(node yaml.Node) []string
- func ParseSingleTask(taskName string, runFlags *core.RunFlags, setFlags *core.SetRunFlags, ...) ([]Task, []Project, error)
- func ParseTaskEnv(env yaml.Node, userEnv []string, parentEnv []string, configEnv []string) ([]string, error)
- func ParseTasksEnv(tasks []Task)
- func RenameDuplicates(projects []Project)
- func StyleFg(colr string) color.RGBColor
- func StyleFormat(text string, format string) string
- func StyleString(text string, opts ColorOptions, useColors bool) string
- func TaskSpinner() (yacspin.Spinner, error)
- func UpdateProjectsToGitignore(projectNames []string, gitignoreFilename string) (err error)
- type Block
- type Border
- type ColorOptions
- type Command
- type Config
- func (c *Config) CheckConfigNoColor()
- func (c Config) EditConfig() error
- func (c Config) EditProject(name string) error
- func (c Config) EditTask(name string) error
- func (c Config) FilterProjects(cwdFlag bool, allProjectsFlag bool, projectsFlag []string, ...) ([]Project, error)
- func (c Config) GetCommand(taskName string) (*Command, error)
- func (c *Config) GetContext() string
- func (c *Config) GetContextLine() int
- func (c Config) GetCwdProject() (Project, error)
- func (c Config) GetEnvList() []string
- func (c Config) GetFilteredProjects(flags *core.ProjectFlags) ([]Project, error)
- func (c *Config) GetImportList() ([]Import, []ResourceErrors[Import])
- func (c Config) GetIntersectProjects(ps ...[]Project) []Project
- func (c Config) GetProject(name string) (*Project, error)
- func (c *Config) GetProjectList() ([]Project, []ResourceErrors[Project])
- func (c Config) GetProjectNames() []string
- func (c Config) GetProjectPaths() []string
- func (c Config) GetProjectUrls() []string
- func (c Config) GetProjectsByName(projectNames []string) ([]Project, error)
- func (c Config) GetProjectsByPath(dirs []string) ([]Project, error)
- func (c Config) GetProjectsByTags(tags []string) ([]Project, error)
- func (c Config) GetProjectsByTagsExpr(tagsExpr string) ([]Project, error)
- func (c Config) GetProjectsTree(dirs []string, tags []string) ([]TreeNode, error)
- func (c Config) GetSpec(name string) (*Spec, error)
- func (c *Config) GetSpecList() ([]Spec, []ResourceErrors[Spec])
- func (c Config) GetSpecNames() []string
- func (c Config) GetTagAssocations(tags []string) ([]Tag, error)
- func (c Config) GetTags() []string
- func (c Config) GetTarget(name string) (*Target, error)
- func (c *Config) GetTargetList() ([]Target, []ResourceErrors[Target])
- func (c Config) GetTargetNames() []string
- func (c Config) GetTask(name string) (*Task, error)
- func (c *Config) GetTaskList() ([]Task, []ResourceErrors[Task])
- func (c Config) GetTaskNameAndDesc() []string
- func (c Config) GetTaskNames() []string
- func (c Config) GetTaskProjects(task *Task, flags *core.RunFlags, setFlags *core.SetRunFlags) ([]Project, error)
- func (c Config) GetTasksByNames(names []string) ([]Task, error)
- func (c Config) GetTheme(name string) (*Theme, error)
- func (c Config) GetThemeNames() []string
- func (c *Config) ParseThemes() ([]Theme, []ResourceErrors[Theme])
- type ConfigResources
- type FoundCyclicDependency
- type Import
- type Lexer
- type Node
- type NodeLink
- type Parser
- type Position
- type Project
- type Remote
- type Resource
- type ResourceErrors
- type Row
- type Spec
- type Stream
- type TNode
- type TUI
- type Table
- type TableOutput
- type Tag
- type Target
- type Task
- type Theme
- type Token
- type TokenType
- type Tree
- type TreeNode
- type Worktree
Constants ¶
This section is empty.
Variables ¶
var ( DEFAULT_SHELL = "bash -c" DEFAULT_SHELL_PROGRAM = "bash" ACCEPTABLE_FILE_NAMES = []string{"mani.yaml", "mani.yml", ".mani.yaml", ".mani.yml"} DEFAULT_THEME = Theme{ Name: "default", Stream: DefaultStream, Table: DefaultTable, Tree: DefaultTree, TUI: DefaultTUI, Block: DefaultBlock, Color: core.Ptr(true), } DEFAULT_TARGET = Target{ Name: "default", All: false, Cwd: false, Projects: []string{}, Paths: []string{}, Tags: []string{}, TagsExpr: "", } DEFAULT_SPEC = Spec{ Name: "default", Output: "stream", Parallel: false, Forks: 4, IgnoreErrors: false, IgnoreNonExisting: false, OmitEmptyRows: false, OmitEmptyColumns: false, ClearOutput: true, } )
var DefaultBlock = Block{ Key: &ColorOptions{ Fg: core.Ptr("#5f87d7"), Attr: core.Ptr(""), Format: core.Ptr(""), }, Separator: &ColorOptions{ Fg: core.Ptr("#5f87d7"), Attr: core.Ptr(""), Format: core.Ptr(""), }, Value: &ColorOptions{ Fg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, ValueTrue: &ColorOptions{ Fg: core.Ptr("#00af5f"), Attr: core.Ptr(""), Format: core.Ptr(""), }, ValueFalse: &ColorOptions{ Fg: core.Ptr("#d75f5f"), Attr: core.Ptr(""), Format: core.Ptr(""), }, }
var DefaultStream = Stream{ Prefix: true, Header: true, HeaderPrefix: "TASK", HeaderChar: "*", PrefixColors: []string{"#d787ff", "#00af5f", "#d75f5f", "#5f87d7", "#00af87", "#5f00ff"}, }
var DefaultTUI = TUI{ Default: &ColorOptions{ Fg: core.Ptr(""), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, Border: &ColorOptions{ Fg: core.Ptr(""), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, BorderFocus: &ColorOptions{ Fg: core.Ptr("#d787ff"), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, Title: &ColorOptions{ Fg: core.Ptr(""), Bg: core.Ptr(""), Attr: core.Ptr(""), Align: core.Ptr("center"), Format: core.Ptr(""), }, TitleActive: &ColorOptions{ Fg: core.Ptr("#000000"), Bg: core.Ptr("#d787ff"), Attr: core.Ptr(""), Align: core.Ptr("center"), Format: core.Ptr(""), }, Button: &ColorOptions{ Fg: core.Ptr(""), Bg: core.Ptr(""), Attr: core.Ptr(""), Align: core.Ptr(""), Format: core.Ptr(""), }, ButtonActive: &ColorOptions{ Fg: core.Ptr("#080808"), Bg: core.Ptr("#d787ff"), Attr: core.Ptr(""), Align: core.Ptr(""), Format: core.Ptr(""), }, Item: &ColorOptions{ Fg: core.Ptr(""), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, ItemFocused: &ColorOptions{ Fg: core.Ptr("#ffffff"), Bg: core.Ptr("#262626"), Attr: core.Ptr(""), Format: core.Ptr(""), }, ItemSelected: &ColorOptions{ Fg: core.Ptr("#5f87d7"), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, ItemDir: &ColorOptions{ Fg: core.Ptr("#d787ff"), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, ItemRef: &ColorOptions{ Fg: core.Ptr("#d787ff"), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, TableHeader: &ColorOptions{ Fg: core.Ptr("#d787ff"), Bg: core.Ptr(""), Attr: core.Ptr("bold"), Align: core.Ptr("left"), Format: core.Ptr(""), }, SearchLabel: &ColorOptions{ Fg: core.Ptr("#d7d75f"), Bg: core.Ptr(""), Attr: core.Ptr("bold"), Format: core.Ptr(""), }, SearchText: &ColorOptions{ Fg: core.Ptr(""), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, FilterLabel: &ColorOptions{ Fg: core.Ptr("#d7d75f"), Bg: core.Ptr(""), Attr: core.Ptr("bold"), Format: core.Ptr(""), }, FilterText: &ColorOptions{ Fg: core.Ptr(""), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, ShortcutLabel: &ColorOptions{ Fg: core.Ptr("#00af5f"), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, ShortcutText: &ColorOptions{ Fg: core.Ptr(""), Bg: core.Ptr(""), Attr: core.Ptr(""), Format: core.Ptr(""), }, }
DefaultTUI Not all attributes are used, but no clean way to add them since MergeThemeOptions initializes all of the fields.
var DefaultTable = Table{ Box: table.StyleDefault.Box, Style: "ascii", Border: &Border{ Around: core.Ptr(false), Columns: core.Ptr(true), Header: core.Ptr(true), Rows: core.Ptr(true), }, Header: &ColorOptions{ Fg: core.Ptr("#d787ff"), Attr: core.Ptr("bold"), Format: core.Ptr(""), }, TitleColumn: &ColorOptions{ Fg: core.Ptr("#5f87d7"), Attr: core.Ptr("bold"), Format: core.Ptr(""), }, }
var DefaultTree = Tree{
Style: "light",
}
Functions ¶
func CheckUserColor ¶ added in v0.30.0
func EvaluateEnv ¶ added in v0.20.0
func FormatErrors ¶ added in v0.20.0
func IsGitWorktree ¶ added in v0.32.0
IsGitWorktree checks if the given path is a git worktree (not the main repo).
A worktree's .git is a FILE (not directory) containing: "gitdir: /path/to/main-repo/.git/worktrees/worktree-name"
func LoadBlockTheme ¶ added in v0.30.0
func LoadBlockTheme(block *Block)
func LoadStreamTheme ¶ added in v0.30.0
func LoadStreamTheme(stream *Stream)
func LoadTUITheme ¶ added in v0.30.0
func LoadTUITheme(tui *TUI)
func LoadTableTheme ¶ added in v0.30.0
func LoadTableTheme(mTable *Table)
func LoadTreeTheme ¶ added in v0.30.0
func LoadTreeTheme(tree *Tree)
func MergeEnvs ¶ added in v0.20.0
MergeEnvs Merges environment variables. Priority is from highest to lowest (1st env takes precedence over the last entry).
func ParseManyTasks ¶ added in v0.30.0
func ParseNodeEnv ¶ added in v0.20.0
func ParseSingleTask ¶ added in v0.30.0
func ParseTaskEnv ¶ added in v0.20.0
func ParseTasksEnv ¶ added in v0.30.0
func ParseTasksEnv(tasks []Task)
func RenameDuplicates ¶ added in v0.20.0
func RenameDuplicates(projects []Project)
func StyleFormat ¶ added in v0.30.0
func StyleString ¶ added in v0.30.0
func StyleString(text string, opts ColorOptions, useColors bool) string
Used for gookit/color printing tables/blocks
func TaskSpinner ¶ added in v0.6.1
Types ¶
type Block ¶ added in v0.30.0
type Block struct {
Key *ColorOptions `yaml:"key"`
Separator *ColorOptions `yaml:"separator"`
Value *ColorOptions `yaml:"value"`
ValueTrue *ColorOptions `yaml:"value_true"`
ValueFalse *ColorOptions `yaml:"value_false"`
}
type ColorOptions ¶ added in v0.20.0
type ColorOptions struct {
Fg *string `yaml:"fg"`
Bg *string `yaml:"bg"`
Align *string `yaml:"align"`
Attr *string `yaml:"attr"`
Format *string `yaml:"format"`
}
func MergeThemeOptions ¶ added in v0.30.0
func MergeThemeOptions(userOption *ColorOptions, defaultOption *ColorOptions) *ColorOptions
Merges default with user theme. Converts colors to hex, and align, attr, and format to its backend representation (single character).
type Command ¶
type Command struct {
Name string `yaml:"name"`
Desc string `yaml:"desc"`
Shell string `yaml:"shell"` // should be in the format: <program> <command flag>, for instance "sh -c", "node -e"
Cmd string `yaml:"cmd"` // "echo hello world", it should not include the program flag (-c,-e, .etc)
Task string `yaml:"task"`
TaskRef string `yaml:"-"` // Keep a reference to the task
TTY bool `yaml:"tty"`
Env yaml.Node `yaml:"env"`
EnvList []string `yaml:"-"`
// Internal
ShellProgram string `yaml:"-"` // should be in the format: <program>, example: "sh", "node"
CmdArg []string `yaml:"-"` // is in the format ["-c echo hello world"] or ["-c", "echo hello world"], it includes the shell flag
}
type Config ¶
type Config struct {
// Internal
EnvList []string `yaml:"-"`
ImportData []Import `yaml:"-"`
ThemeList []Theme `yaml:"-"`
SpecList []Spec `yaml:"-"`
TargetList []Target `yaml:"-"`
ProjectList []Project `yaml:"-"`
TaskList []Task `yaml:"-"`
Path string `yaml:"-"`
Dir string `yaml:"-"`
UserConfigFile *string `yaml:"-"`
ConfigPaths []string `yaml:"-"`
Color bool `yaml:"-"`
Shell string `yaml:"shell"`
SyncRemotes *bool `yaml:"sync_remotes"`
SyncGitignore *bool `yaml:"sync_gitignore"`
RemoveOrphanedWorktrees *bool `yaml:"remove_orphaned_worktrees"`
ReloadTUI *bool `yaml:"reload_tui_on_change"`
// Intermediate
Env yaml.Node `yaml:"env"`
Import yaml.Node `yaml:"import"`
Themes yaml.Node `yaml:"themes"`
Specs yaml.Node `yaml:"specs"`
Targets yaml.Node `yaml:"targets"`
Projects yaml.Node `yaml:"projects"`
Tasks yaml.Node `yaml:"tasks"`
}
func ReadConfig ¶
Function to read Mani configs.
func (*Config) CheckConfigNoColor ¶ added in v0.20.0
func (c *Config) CheckConfigNoColor()
func (Config) EditConfig ¶ added in v0.10.0
Open mani config in editor
func (Config) EditProject ¶ added in v0.10.0
Open mani config in editor and optionally go to line matching the project name
func (Config) EditTask ¶ added in v0.10.0
Open mani config in editor and optionally go to line matching the task name
func (Config) FilterProjects ¶
func (c Config) FilterProjects( cwdFlag bool, allProjectsFlag bool, projectsFlag []string, projectPathsFlag []string, tagsFlag []string, tagsExprFlag string, ) ([]Project, error)
FilterProjects filters the project list based on various criteria. It supports filtering by: - All projects (allProjectsFlag) - Current working directory (cwdFlag) - Project names (projectsFlag) - Project paths (projectPathsFlag) - Project tags (tagsFlag) - Tag expressions (tagsExprFlag)
Priority handling:
- If cwdFlag is true, the function immediately returns only the current working directory project, ignoring all other filters.
- For all other combinations of filters, the function collects projects from each filter into separate slices, then finds their intersection. If multiple filters are specified, only projects that match ALL filters will be returned.
func (*Config) GetContext ¶ added in v0.20.0
func (*Config) GetContextLine ¶ added in v0.20.0
func (Config) GetCwdProject ¶
func (Config) GetEnvList ¶ added in v0.10.0
Returns the config env list as a string splice in the form [key=value, key1=$(echo 123)]
func (Config) GetFilteredProjects ¶ added in v0.30.0
func (c Config) GetFilteredProjects(flags *core.ProjectFlags) ([]Project, error)
GetFilteredProjects retrieves a filtered list of projects based on the provided ProjectFlags. It processes various filtering criteria and returns the matching projects.
The function follows these steps: 1. If a target is specified, loads the target configuration, otherwise sets all to false 2. Merges any provided flag values with the target configuration 3. Applies all filtering criteria using FilterProjects
func (*Config) GetImportList ¶ added in v0.20.0
func (c *Config) GetImportList() ([]Import, []ResourceErrors[Import])
Populates SpecList and creates a default spec if no default spec is set.
func (Config) GetIntersectProjects ¶ added in v0.30.0
func (Config) GetProject ¶ added in v0.10.0
func (*Config) GetProjectList ¶ added in v0.10.0
func (c *Config) GetProjectList() ([]Project, []ResourceErrors[Project])
func (Config) GetProjectNames ¶
func (Config) GetProjectPaths ¶ added in v0.10.0
*
- GetProjectPaths For each project path, get all the enumerations of dirnames.
- Example:
- Input:
- - /frontend/tools/project-a
- - /frontend/tools/project-b
- - /frontend/tools/node/project-c
- - /backend/project-d
- Output:
- - /frontend
- - /frontend/tools
- - /frontend/tools/node
- - /backend
func (Config) GetProjectUrls ¶
func (Config) GetProjectsByName ¶
func (Config) GetProjectsByPath ¶ added in v0.10.0
GetProjectsByPath Projects must have all dirs to match. If user provides a path which does not exist, then return error containing all the paths it didn't find. Supports glob patterns: - '*' matches any sequence of non-separator characters - '**' matches any sequence of characters including separators
func (Config) GetProjectsByTags ¶
GetProjectsByTags Projects must have all tags to match. For instance, if --tags frontend,backend is passed, then a project must have both tags. We only return error if the flags provided do not exist in the mani config.
func (Config) GetProjectsByTagsExpr ¶ added in v0.30.0
GetProjectsByTagsExpr Projects must have all tags to match. For instance, if --tags frontend,backend is passed, then a project must have both tags. We only return error if the tags provided do not exist.
func (Config) GetProjectsTree ¶ added in v0.6.1
func (*Config) GetSpecList ¶ added in v0.12.0
func (c *Config) GetSpecList() ([]Spec, []ResourceErrors[Spec])
Populates SpecList and creates a default spec if no default spec is set.
func (Config) GetSpecNames ¶ added in v0.12.0
func (Config) GetTagAssocations ¶ added in v0.10.0
func (*Config) GetTargetList ¶ added in v0.12.0
func (c *Config) GetTargetList() ([]Target, []ResourceErrors[Target])
Populates TargetList and creates a default target if no default target is set.
func (Config) GetTargetNames ¶ added in v0.12.0
func (*Config) GetTaskList ¶ added in v0.10.0
func (c *Config) GetTaskList() ([]Task, []ResourceErrors[Task])
func (Config) GetTaskNameAndDesc ¶ added in v0.20.0
func (Config) GetTaskNames ¶ added in v0.6.1
func (Config) GetTaskProjects ¶ added in v0.12.0
func (c Config) GetTaskProjects( task *Task, flags *core.RunFlags, setFlags *core.SetRunFlags, ) ([]Project, error)
GetTaskProjects retrieves a filtered list of projects for a given task, applying runtime flag overrides and target configurations.
Behavior depends on the provided runtime flags (flags, setFlags) and task target:
- If runtime flags are set (Projects, Paths, Tags, etc.), they take precedence and reset the task's target configuration.
- If a target is explicitly specified (flags.Target), it loads and applies that target's configuration before applying runtime flag overrides.
- If no runtime flags or target are provided, the task's default target data is used.
Filtering priority (highest to lowest):
- Runtime flags (e.g., --projects, --tags, --cwd)
- Explicit target configuration (--target)
- Task's default target data (if no overrides exist)
Returns:
- Filtered []Project based on the resolved configuration.
- Non-nil error if target resolution or project filtering fails.
func (Config) GetTasksByNames ¶ added in v0.6.1
func (Config) GetThemeNames ¶ added in v0.10.0
func (*Config) ParseThemes ¶ added in v0.30.0
func (c *Config) ParseThemes() ([]Theme, []ResourceErrors[Theme])
Populates ThemeList
type ConfigResources ¶ added in v0.10.0
type ConfigResources struct {
Imports []Import
Themes []Theme
Specs []Spec
Targets []Target
Tasks []Task
Projects []Project
Envs []string
ThemeErrors []ResourceErrors[Theme]
SpecErrors []ResourceErrors[Spec]
TargetErrors []ResourceErrors[Target]
TaskErrors []ResourceErrors[Task]
ProjectErrors []ResourceErrors[Project]
ImportErrors []ResourceErrors[Import]
}
Used for config imports
type FoundCyclicDependency ¶ added in v0.20.0
type FoundCyclicDependency struct {
Cycles []NodeLink
}
func (*FoundCyclicDependency) Error ¶ added in v0.20.0
func (c *FoundCyclicDependency) Error() string
type Import ¶ added in v0.20.0
type Import struct {
Path string
// contains filtered or unexported fields
}
func (*Import) GetContext ¶ added in v0.20.0
func (*Import) GetContextLine ¶ added in v0.20.0
type Project ¶
type Project struct {
Name string `yaml:"name"`
Path string `yaml:"path"`
Desc string `yaml:"desc"`
URL string `yaml:"url"`
Clone string `yaml:"clone"`
Branch string `yaml:"branch"`
SingleBranch *bool `yaml:"single_branch"`
Sync *bool `yaml:"sync"`
Tags []string `yaml:"tags"`
EnvList []string `yaml:"-"`
RemoteList []Remote `yaml:"-"`
Env yaml.Node `yaml:"env"`
Remotes yaml.Node `yaml:"remotes"`
Worktrees yaml.Node `yaml:"worktrees"`
WorktreeList []Worktree `yaml:"-"`
RelPath string
// contains filtered or unexported fields
}
func FindVCSystems ¶
func (*Project) GetContext ¶ added in v0.20.0
func (*Project) GetContextLine ¶ added in v0.20.0
func (Project) IsSingleBranch ¶ added in v0.30.0
type Remote ¶ added in v0.24.0
func ParseRemotes ¶ added in v0.24.0
ParseRemotes List of remotes (key: value)
type ResourceErrors ¶ added in v0.20.0
type Spec ¶ added in v0.12.0
type Spec struct {
Name string `yaml:"name"`
Output string `yaml:"output"`
Parallel bool `yaml:"parallel"`
IgnoreErrors bool `yaml:"ignore_errors"`
IgnoreNonExisting bool `yaml:"ignore_non_existing"`
OmitEmptyRows bool `yaml:"omit_empty_rows"`
OmitEmptyColumns bool `yaml:"omit_empty_columns"`
ClearOutput bool `yaml:"clear_output"`
Forks uint32 `yaml:"forks"`
// contains filtered or unexported fields
}
func (*Spec) GetContext ¶ added in v0.20.0
func (*Spec) GetContextLine ¶ added in v0.20.0
type TUI ¶ added in v0.30.0
type TUI struct {
Default *ColorOptions `yaml:"default"`
Border *ColorOptions `yaml:"border"`
BorderFocus *ColorOptions `yaml:"border_focus"`
Title *ColorOptions `yaml:"title"`
TitleActive *ColorOptions `yaml:"title_active"`
TableHeader *ColorOptions `yaml:"table_header"`
Item *ColorOptions `yaml:"item"`
ItemFocused *ColorOptions `yaml:"item_focused"`
ItemSelected *ColorOptions `yaml:"item_selected"`
ItemDir *ColorOptions `yaml:"item_dir"`
ItemRef *ColorOptions `yaml:"item_ref"`
Button *ColorOptions `yaml:"button"`
ButtonActive *ColorOptions `yaml:"button_active"`
SearchLabel *ColorOptions `yaml:"search_label"`
SearchText *ColorOptions `yaml:"search_text"`
FilterLabel *ColorOptions `yaml:"filter_label"`
FilterText *ColorOptions `yaml:"filter_text"`
ShortcutLabel *ColorOptions `yaml:"shortcut_label"`
ShortcutText *ColorOptions `yaml:"shortcut_text"`
}
type Table ¶ added in v0.20.0
type Table struct {
// Stylable via YAML
Style string `yaml:"style"`
Border *Border `yaml:"border"`
Header *ColorOptions `yaml:"header"`
TitleColumn *ColorOptions `yaml:"title_column"`
// Not stylable via YAML
Box table.BoxStyle `yaml:"-"`
}
type TableOutput ¶ added in v0.20.0
type Target ¶ added in v0.10.0
type Target struct {
Name string `yaml:"name"`
All bool `yaml:"all"`
Projects []string `yaml:"projects"`
Paths []string `yaml:"paths"`
Tags []string `yaml:"tags"`
TagsExpr string `yaml:"tags_expr"`
Cwd bool `yaml:"cwd"`
// contains filtered or unexported fields
}
func (*Target) GetContext ¶ added in v0.20.0
func (*Target) GetContextLine ¶ added in v0.20.0
type Task ¶ added in v0.6.1
type Task struct {
SpecData Spec
TargetData Target
ThemeData Theme
Name string `yaml:"name"`
Desc string `yaml:"desc"`
Shell string `yaml:"shell"`
Cmd string `yaml:"cmd"`
Commands []Command `yaml:"commands"`
EnvList []string `yaml:"-"`
TTY bool `yaml:"tty"`
Env yaml.Node `yaml:"env"`
Spec yaml.Node `yaml:"spec"`
Target yaml.Node `yaml:"target"`
Theme yaml.Node `yaml:"theme"`
// Internal
ShellProgram string `yaml:"-"` // should be in the format: <program>, example: "sh", "node"
CmdArg []string `yaml:"-"` // is in the format ["-c echo hello world"] or ["-c", "echo hello world"], it includes the shell flag
// contains filtered or unexported fields
}
func (Task) ConvertTaskToCommand ¶ added in v0.30.0
func (*Task) GetContext ¶ added in v0.20.0
func (*Task) GetContextLine ¶ added in v0.20.0
type Theme ¶ added in v0.10.0
type Theme struct {
Name string `yaml:"name"`
Table Table `yaml:"table"`
Tree Tree `yaml:"tree"`
Stream Stream `yaml:"stream"`
Block Block `yaml:"block"`
TUI TUI `yaml:"tui"`
Color *bool `yaml:"color"`
// contains filtered or unexported fields
}