aboutsummaryrefslogtreecommitdiffstats
path: root/app/compose.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/compose.go')
-rw-r--r--app/compose.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/compose.go b/app/compose.go
index bf1d32cb..75f90f12 100644
--- a/app/compose.go
+++ b/app/compose.go
@@ -1331,6 +1331,11 @@ func (c *Composer) showTerminal() error {
c.acct.PushError(fmt.Errorf("could not start editor: %w", err))
}
editor := exec.Command("/bin/sh", "-c", editorName+" "+c.email.Name())
+ env := os.Environ()
+ env = append(env, fmt.Sprintf("AERC_ACCOUNT=%s", c.Account().Name()))
+ env = append(env, fmt.Sprintf("AERC_ADDRESS_BOOK_CMD=%s", c.Account().AccountConfig().AddressBookCmd))
+ editor.Env = env
+
c.editor, err = NewTerminal(editor)
if err != nil {
return err