If the color config file exists, load colors from it

master
Aadhavan Srinivasan 4 months ago
parent 46e3e9da85
commit eb2a0a9122

@ -120,6 +120,13 @@ func main() {
} }
// Assuming the file is not empty... // 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. // If the given file has a config, load the config into a stack of regColors.
regColorStack, err := loadConfig(configFilename) regColorStack, err := loadConfig(configFilename)
if err != nil { if err != nil {

Loading…
Cancel
Save