From eb2a0a9122d51e8f63a36dff6d539f69570e23b9 Mon Sep 17 00:00:00 2001 From: Rockingcool Date: Thu, 15 Aug 2024 10:19:37 -0500 Subject: [PATCH] If the color config file exists, load colors from it --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index ba26137..32942ff 100644 --- a/main.go +++ b/main.go @@ -120,6 +120,13 @@ func main() { } // Assuming the file is not empty... + // If a ccat.colors file exists in the config directory, load all the colors in it + if fileExists(filepath.Join(configPath, "ccat.colors")) { + err := loadColorsFromFile(filepath.Join(configPath, "ccat.colors")) + if err != nil { + printErrAndExit(err.Error()) + } + } // If the given file has a config, load the config into a stack of regColors. regColorStack, err := loadConfig(configFilename) if err != nil {