diff options
author | ARaspiK <araspik@protonmail.com> | 2020-07-01 07:52:14 +0000 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2020-07-02 09:13:14 +0200 |
commit | e1c2b596dc9e45976253d75a6b704914fcdcb82c (patch) | |
tree | 793aed9505dc3c47da5aa44f3ffb25ff40cb0da5 /config/config.go | |
parent | bf16ccde484ce3b6d2a4b843e7ebc04a9b2a957d (diff) | |
download | aerc-e1c2b596dc9e45976253d75a6b704914fcdcb82c.tar.gz |
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.
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go index 8ebd69d3..ce599440 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" { |