diff --git a/cmd/util.go b/cmd/util.go index 086cbdb..aa013db 100644 --- a/cmd/util.go +++ b/cmd/util.go @@ -55,7 +55,7 @@ func filter(options []string, tag string) (commands []string, err error) { t += tags snippetTexts[t] = s - if config.Flag.Color { + if config.Flag.Color || config.Conf.General.Color { t = fmt.Sprintf("[%s]: %s%s", color.HiRedString(s.Description), command, color.HiCyanString(tags)) } diff --git a/config/config.go b/config/config.go index a4a7bac..0ef553f 100644 --- a/config/config.go +++ b/config/config.go @@ -30,6 +30,7 @@ type GeneralConfig struct { SelectCmd string Backend string SortBy string + Color bool Cmd []string } @@ -123,6 +124,7 @@ func (cfg *Config) Load(file string) error { cfg.General.Column = 40 cfg.General.SelectCmd = "fzf --ansi --layout=reverse --border --height=90% --pointer=* --cycle --prompt=Snippets:" cfg.General.Backend = "gist" + cfg.General.Color = false cfg.Gist.FileName = "pet-snippet.toml"