summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2020-04-24 11:42:21 +0200
committerDrew DeVault <sir@cmpwn.com>2020-04-24 12:59:21 -0400
commit7f033278eb3afc3b9ae2dca28efe8d4a3514d14a (patch)
treeee02c27cb1dfadd54be0178e91d6f2d5f0cbf4dc /config
parent447e662057c663f47f5c8a490543b1a52b26bc86 (diff)
downloadaerc-7f033278eb3afc3b9ae2dca28efe8d4a3514d14a.zip
Add postpone command
This command uses the Postpone folder from the account config to save messages to. Messages are saved as though they were sent so have a valid 'to' recipient address and should be able to be read back in for later editing.
Diffstat (limited to 'config')
-rw-r--r--config/binds.conf1
-rw-r--r--config/config.go10
2 files changed, 7 insertions, 4 deletions
diff --git a/config/binds.conf b/config/binds.conf
index 5887203..abfd77e 100644
--- a/config/binds.conf
+++ b/config/binds.conf
@@ -90,6 +90,7 @@ $ex = <C-x>
# Keybindings used when reviewing a message to be sent
y = :send<Enter>
n = :abort<Enter>
+p = :postpone<Enter>
q = :abort<Enter>
e = :edit<Enter>
a = :attach<space>
diff --git a/config/config.go b/config/config.go
index 5794388..e00518c 100644
--- a/config/config.go
+++ b/config/config.go
@@ -70,6 +70,7 @@ type AccountConfig struct {
Archive string
CopyTo string
Default string
+ Postpone string
From string
Name string
Source string
@@ -171,10 +172,11 @@ func loadAccountConfig(path string) ([]AccountConfig, error) {
}
sec := file.Section(_sec)
account := AccountConfig{
- Archive: "Archive",
- Default: "INBOX",
- Name: _sec,
- Params: make(map[string]string),
+ Archive: "Archive",
+ Default: "INBOX",
+ Postpone: "Drafts",
+ Name: _sec,
+ Params: make(map[string]string),
}
if err = sec.MapTo(&account); err != nil {
return nil, err