From e1c2b596dc9e45976253d75a6b704914fcdcb82c Mon Sep 17 00:00:00 2001 From: ARaspiK Date: Wed, 1 Jul 2020 07:52:14 +0000 Subject: Add a 'folders-exclude' option Added a 'folders-exclude' option that allows removing selected folders from the directory list sidebar. My motivating example was that removing a single folder from the list using Golang regexes seemed pretty hard, so this is a better way to do it. The excluded folders list is included in the man page. --- config/config.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config/config.go') diff --git a/config/config.go b/config/config.go index 8ebd69d..ce59944 100644 --- a/config/config.go +++ b/config/config.go @@ -76,6 +76,7 @@ type AccountConfig struct { Source string SourceCredCmd string Folders []string + FoldersExclude []string Params map[string]string Outgoing string OutgoingCredCmd string @@ -186,6 +187,10 @@ func loadAccountConfig(path string) ([]AccountConfig, error) { folders := strings.Split(val, ",") sort.Strings(folders) account.Folders = folders + } else if key == "folders-exclude" { + folders := strings.Split(val, ",") + sort.Strings(folders) + account.FoldersExclude = folders } else if key == "source-cred-cmd" { account.SourceCredCmd = val } else if key == "outgoing" { -- cgit v1.2.3