blob: 819b30d6352344fdaef38a6c47d4619335423624 (
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
27
28
29
30
|
package commands
import (
"git.sr.ht/~rjarry/aerc/app"
)
type Echo struct {
Template string `opt:"..." required:"false"`
}
func init() {
Register(Echo{})
}
func (Echo) Description() string {
return "Print text after template expansion."
}
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
}
|