diff options
Diffstat (limited to 'commands/compose/edit.go')
-rw-r--r-- | commands/compose/edit.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/commands/compose/edit.go b/commands/compose/edit.go new file mode 100644 index 00000000..18ba4817 --- /dev/null +++ b/commands/compose/edit.go @@ -0,0 +1,21 @@ +package compose + +import ( + "errors" + + "git.sr.ht/~sircmpwn/aerc/widgets" +) + +func init() { + register("edit", CommandEdit) +} + +func CommandEdit(aerc *widgets.Aerc, args []string) error { + if len(args) != 1 { + return errors.New("Usage: edit") + } + composer, _ := aerc.SelectedTab().(*widgets.Composer) + composer.ShowTerminal() + composer.FocusTerminal() + return nil +} |