aboutsummaryrefslogtreecommitdiffstats
path: root/commands/echo.go
blob: ebe997da5384d35e82a125d85212fb623285972a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package commands

import (
	"git.sr.ht/~rjarry/aerc/app"
)

type Echo struct {
	Template string `opt:"..." required:"false"`
}

func init() {
	Register(Echo{})
}

func (Echo) Aliases() []string {
	return []string{"echo"}
}

func (Echo) Context() CommandContext {
	return GLOBAL
}

func (e Echo) Execute(args []string) error {
	app.PushSuccess(e.Template)
	return nil
}