aboutsummaryrefslogtreecommitdiffstats
path: root/config/config.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-07-11 11:11:37 +0200
committerRobin Jarry <robin@jarry.cc>2022-07-17 19:00:44 +0200
commitdb00accb574190d1d33d7c57e2677781a015b301 (patch)
tree5e6374ae480460426ecfc1923b9eb0d17fad4c1c /config/config.go
parentf2dac06029a273aa8d5bcfc24102e113b29138be (diff)
downloadaerc-db00accb574190d1d33d7c57e2677781a015b301.tar.gz
config: allow per-account address-book-cmd
When using multiple accounts, the contacts may be different. Allow using specific address book commands per account. Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/config/config.go b/config/config.go
index e0c86082..ebdee5e1 100644
--- a/config/config.go
+++ b/config/config.go
@@ -112,6 +112,7 @@ type AccountConfig struct {
SignatureCmd string
EnableFoldersSort bool `ini:"enable-folders-sort"`
FoldersSort []string `ini:"folders-sort" delim:","`
+ AddressBookCmd string `ini:"address-book-cmd"`
// CheckMail
CheckMail time.Duration `ini:"check-mail"`
@@ -279,6 +280,8 @@ func loadAccountConfig(path string) ([]AccountConfig, error) {
account.PgpAutoSign, _ = strconv.ParseBool(val)
} else if key == "pgp-opportunistic-encrypt" {
account.PgpOpportunisticEncrypt, _ = strconv.ParseBool(val)
+ } else if key == "address-book-cmd" {
+ account.AddressBookCmd = val
} else if key != "name" {
account.Params[key] = val
}