Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Disabled []string
}
Config holds user preferences loaded from ~/.config/chop/config.yml.
func Load ¶
func Load() Config
Load reads the config file and returns a Config. Returns defaults if the file doesn't exist or can't be parsed.
func LoadWithLocal ¶ added in v1.1.0
LoadWithLocal loads the global config, then overlays a local .chop.yml from the given directory (if it exists). The local disabled list fully replaces the global one.
func (Config) IsDisabled ¶
IsDisabled returns true if the given base command (and optional subcommand) matches an entry in the disabled list.
Matching rules:
- "git" disables all git subcommands
- "git diff" disables only "git diff"
Call with: IsDisabled("git", "diff") or IsDisabled("git")
Click to show internal directories.
Click to hide internal directories.